[Gllug] File permissions

John Hearns john.hearns at framestore.co.uk
Sat Sep 8 16:19:53 UTC 2001


Dylan wrote:

>Hi
>
>How do I copy or move a directory as root, without the new direcory and files 
>changing permissions and gaining root as owner and group?
>
>Cheers
>

One way is to use tar:

cd fromdir
 tar cBf - . | (cd todir && tar xBf -)


For newbies, this means:

change  to the directory you wish to move

start a tar process, but send the output via a pipe - the | symbol
to the input of another tar process, which is untarring into the
directory you want to move to.


Actually, I think the B flags might not be needed, but
that's the way I've always done it.



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list