[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Resizing Partitions



[...]
>Best to always use -xdev and -depth on find for a cpio.  The -xdev keeps it
>from crossing devices, and -depth goes down directories before the
>directory itself.  This prevents a problem with directories that can't be
>written to.
>
>Also, _never_ use the -a option to cpio.  It resets the access time on the
>file, at the expense of making the ctime on the file the current time.
>This makes any decent backup program treat the files as new.  By not
>specifying the -a option, you lose one small piece of information, but you
>get to keep something much more useful.

Personally, I use

cd /source
tar clf - . | (cd /dest; tar xvf -)

It's slower than cpio, but I actually understand it. (cpio gives me the 
screaming heebie-jeebies.) The l option in the first tar is the equivalent of 
-xdev. You should only do this with GNU tar as non-GNU tars have nasty 
filename length problems.

Alternatively:

cp -av /source /dest

...does a reasonable job but it doesn't preserve *all* attributes of the 
files. I've yet to work out exactly what it does and doesn't do.

-- 
+- David Given ---------------McQ-+ "There does not now, nor will there ever,
|  Work: dg@tao-group.com         | exist a programming language in which it is
|  Play: dgiven@iname.com         | the least bit hard to write bad programs."
+- http://wired.st-and.ac.uk/~dg -+ --- Flon's Axiom                           




Reply to: