Re: Copy ./ to subdirectory.

2007-09-01 Thread Osamu Aoki
Hi, On Wed, Aug 29, 2007 at 01:16:50PM +0100, James Preece wrote: > This is probably a simple question but I can't find the answer > anywhere and my friend Google won't search for ./ and 'copy' brings up > all sorts. > > Basically, I've got a folder containing various files for a website > (for s

Re: Copy ./ to subdirectory.

2007-08-30 Thread Bob Proulx
Mike Bird wrote: > James Preece wrote: > > cp -r ./ backup > > I'd use rsync locally. +1 on rsync. It is the perfect tool for this task. > First a dry-run in case I'd made a mistake: Excellent advice. Follow the advice or suffer for it when a typo is made! :-) > rsync -a --delete --exclude=ba

Re: Copy ./ to subdirectory.

2007-08-29 Thread Patrick Ouellette
On Wed, Aug 29, 2007 at 01:16:50PM +0100, James Preece wrote: > > cp: cannot copy a directory, `./', into itself, `backup' > > Is there a way to have cp ignore the newly created directory? Something like: > > cp -r ./ backup --ignore=backup > You could try using tar. Something like tar --exc

Re: Copy ./ to subdirectory.

2007-08-29 Thread Mike Bird
On Wednesday 29 August 2007 05:16, James Preece wrote: > This is probably a simple question but I can't find the answer > anywhere and my friend Google won't search for ./ and 'copy' brings up > all sorts. > > Basically, I've got a folder containing various files for a website > (for simplicity let

Re: Copy ./ to subdirectory.

2007-08-29 Thread Douglas A. Tutty
On Wed, Aug 29, 2007 at 01:16:50PM +0100, James Preece wrote: > Basically, I've got a folder containing various files for a website > (for simplicity lets say it's this): > > /mydirectory/index.html /mydirectory/images/image.gif > > I want to make a backup so in the /mydirectory/ folder I do: >

Re: Copy ./ to subdirectory.

2007-08-29 Thread Benjamin A'Lee
On Wed, Aug 29, 2007 at 01:16:50PM +0100, James Preece wrote: > This is probably a simple question but I can't find the answer > anywhere and my friend Google won't search for ./ and 'copy' brings up > all sorts. > > Basically, I've got a folder containing various files for a website > (for simpli