[thelist] RE: Tar and maintaining permissions....

djc djc at five2one.org
Wed Dec 27 00:58:11 CST 2000


Tony - 

You're really close with what you're doing now.. Try something like this:

tar cpf - * | ( umask 0; cd /new/dir; tar -xvfp - )

the umask 0 will ensure that new files have the same permissions as the
old ones.

That should do the trick for ya, let me know if it doesnt :)

.djc.
ps: sorry about list downtime this weekend, should be somewhat more kosher
now.
 
At 11:54 AM 12/22/2000 -0800, Anthony Baratta wrote:>Howdy...>
>I'm trying to move a large (couple of Gigs) set of files and directories 
>to a new hard drive on my linux box and I'm having problems maintaining 
>permissions during the move. Can I get another set of eyeballs on my tar 
>command and maybe tell me what I'm doing wrong?>
>         tar cpf - *|(cd /new/dir;tar xvpf -)>
>I'm launching the above command while root, from the olde base directory. 
>/new/dir is the new base d

-- 





More information about the thelist mailing list