General method for copying a partition

2010-03-03 Thread Stephen Powell
On Wed, 17 Feb 2010 11:26:43 -0600, Boyd Stephen Smith Jr. wrote: On Wednesday 17 February 2010 11:18:38 Stephen Powell wrote: Then the files are copied between partitions by means of cp -a /media/* /mnt This seems to work OK except if there are dot files (files with names beginning

Re: General method for copying a partition

2010-02-18 Thread Stephen Powell
On Wed, 17 Feb 2010 15:04:32 -0500 (EST), Boyd Stephen Smith Jr. wrote: On Wednesday 17 February 2010 13:40:20 Stephen Powell wrote: On Wed, 17 Feb 2010 12:26:43 -0500 (EST), Boyd Stephen Smith Jr. wrote: Use this instead: cp -a /media/. /mnt OR cp -a /media/{.[!.],}* /mnt Your second

Re: General method for copying a partition

2010-02-18 Thread Paul E Condon
On 20100218_130038, Stephen Powell wrote: On Wed, 17 Feb 2010 15:04:32 -0500 (EST), Boyd Stephen Smith Jr. wrote: On Wednesday 17 February 2010 13:40:20 Stephen Powell wrote: On Wed, 17 Feb 2010 12:26:43 -0500 (EST), Boyd Stephen Smith Jr. wrote: Use this instead: cp -a /media/. /mnt OR

General method for copying a partition

2010-02-17 Thread Stephen Powell
Hi, all! In one of my web pages, as part of a larger overall procedure, I give instructions for copying an entire partition. The basic procedure involves mounting one partition on /media and the other on /mnt. Then the files are copied between partitions by means of cp -a /media/* /mnt

Re: General method for copying a partition

2010-02-17 Thread Boyd Stephen Smith Jr.
On Wednesday 17 February 2010 11:18:38 Stephen Powell wrote: Then the files are copied between partitions by means of cp -a /media/* /mnt This seems to work OK except if there are dot files (files with names beginning with a period) in the top directory of the source partition. Use

Re: General method for copying a partition

2010-02-17 Thread Eduardo M KALINOWSKI
On Qua, 17 Fev 2010, Stephen Powell wrote: In one of my web pages, as part of a larger overall procedure, I give instructions for copying an entire partition. [snip] Of course, special handling is necessary to avoid processing . (the current directory) and .. (the parent directory). Does anyone

Re: General method for copying a partition

2010-02-17 Thread Sjoerd Hardeman
Stephen Powell schreef: Hi, all! In one of my web pages, as part of a larger overall procedure, I give instructions for copying an entire partition. The basic procedure involves mounting one partition on /media and the other on /mnt. Then the files are copied between partitions by means

Re: General method for copying a partition

2010-02-17 Thread Edward J. Shornock
17.02.2010 19:18, Stephen Powell kirjoitti: [...] Of course, special handling is necessary to avoid processing . (the current directory) and .. (the parent directory). Does anyone know a better way? tar cf . | tar -C /target -xpf - or find . -depth -print0 |cpio --null -pvd /target

Re: General method for copying a partition

2010-02-17 Thread Bob McGowan
Sjoerd Hardeman wrote: Stephen Powell schreef: Hi, all! In one of my web pages, as part of a larger overall procedure, I give instructions for copying an entire partition. The basic procedure involves mounting one partition on /media and the other on /mnt. Then the files are copied

Re: General method for copying a partition

2010-02-17 Thread Stephen Powell
On Wed, 17 Feb 2010 12:26:43 -0500 (EST), Boyd Stephen Smith Jr. wrote: On Wednesday 17 February 2010 11:18:38 Stephen Powell wrote: Then the files are copied between partitions by means of cp -a /media/* /mnt This seems to work OK except if there are dot files (files with names

Re: Re: General method for copying a partition

2010-02-17 Thread Clive Standbridge
rsync -a /media/ /mnt/ This is good. Note that the trailing / on /media/ is significant. OR find /media -exec cp -a {} /mnt \; No, that is both wrong and very inefficient:- Wrong - Try this: mkdir /tmp/media /tmp/mnt mkdir -p /tmp/media/a/b/c touch /tmp/media/a/aa /tmp/media/a/b/bb

Re: General method for copying a partition

2010-02-17 Thread Boyd Stephen Smith Jr.
On Wednesday 17 February 2010 13:40:20 Stephen Powell wrote: On Wed, 17 Feb 2010 12:26:43 -0500 (EST), Boyd Stephen Smith Jr. wrote: Use this instead: cp -a /media/. /mnt OR cp -a /media/{.[!.],}* /mnt Your second method doesn't work in ash because ash does not support brace

Re: General method for copying a partition

2010-02-17 Thread Sjoerd Hardeman
Bob McGowan schreef: Sjoerd Hardeman wrote: Stephen Powell schreef: Hi, all! In one of my web pages, as part of a larger overall procedure, I give instructions for copying an entire partition. The basic procedure involves mounting one partition on /media and the other on /mnt. ... ...