> Using tar to move a dir from one location to another and retaining
> user id's and premissions correctly, which cp -R will shag, i.e using
> a users home dir from one disk to another (which mv won't allow) as root
> without making an arse of the whole thing
>> ( cd /home/ ; tar -cvpf - username ) | ( cd /newhome ; tar -xvpf - )
Three problems with this:
1) ( cd /home/ && tar -cvpf - username ) | ( cd /newhome && tar -xvpf - )
is safer, in case the directories don't exist, or you mistype them.
2) The 'p' flag only makes sense when extracting an archive.
3) Specifying 'v' for both creating and extracting will print a nice
mess to the screen ;)
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!