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

Re: Copying a whole subdirectory possible?



Steve Cooper wrote:

> For the most accurate reproduction of a directory tree consider using
> the tar command:
> 
>     tar cf - . | (cd "$1"; tar xvf -)
> 

I always thought that:

tar cf - . | (cd "$1"; tar xpvf -)

was the correct way. The one time I forgot the -p during extraction, I had
permission problems with several files in /dev. Or maybe that was caused by
some other mistake I made.

-- 
David Raeker-Jordan
mailto:rkrjrdn@epix.net
Harrisburg, PA, USA



Reply to: