[TAG] 2-cent Tip: Copying a partition

Ben Okopnik ben at linuxgazette.net
Tue Mar 20 17:20:39 MSK 2007


On Tue, Mar 20, 2007 at 09:09:30AM +0000, Thomas Adam wrote:
> On Tue, 20 Mar 2007 08:57:17 +0000
> Neil Youngman <ny at youngman.org.uk> wrote:
> 
> > I'm not sure what this does that wouldn't be done by 'cp -ax'?
> 
> Lots.  cp -ax wouldn't handle non-regular files, and would suffer the
> same file limit restructions as shell globbing would, hence you'd have
> to mitigate it with xargs, etc.
> 
> Note that the tar equivalent would be something like:
> 
> ```
> (tar cf - *) | ( cd /target; tar xfp -)
> '''
> 
> Plus various different incantations thereof.

...e.g., '-mount' or '-xdev', which tell 'find' not to descend into
directories on mounted FSes. I've never used either of these options, so
I may be off, but I recalled seeing them in the 'find' man page and
thinking "oooh, nifty tool."


-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *




More information about the TAG mailing list