LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Interesting little libC functions & commands...

[ILUG] Interesting little libC functions & commands...

Lars Hecking lhecking at nmrc.ucc.ie
Thu Jun 17 13:16:03 IST 1999


) 
> 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 ;)





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell