ffrr Posted March 14, 2005 Author Report Share Posted March 14, 2005 In my opinion, the best way to replicate a directory tree (or even more than that), is using tar: # (cd /source/parent/ && tar cf - things.to.replicate) | (cd /destination/folder/ && tar xpf -) "things.to.replicate" can be a list of files and/or directories, or even a simple dot (.) for duplicating the whole current directory (current being "/source/parent/" here). Yves. <{POST_SNAPBACK}> Agreed :D for a few variatins like : tar cf - . | (cd /mnt/$TARGET && tar xBf -) (don't miss the full stop either) unix power tools <{POST_SNAPBACK}> Great solutions ! Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted March 15, 2005 Report Share Posted March 15, 2005 There's another nice thing you can do with tar: (me@local)/home/me$ tar cf - Documents/ | ssh me@server 'bzip2 >Documents.tar.bz2' if you're on a weak machine, and have a fast network and powerfull server. Else rely more on your local machine, and do: (me@local)/home/me$ tar czf - Documents/ | ssh me@server 'cat >Documents.tar.bz2' Yves. Quote Link to comment Share on other sites More sharing options...
ianalis Posted March 23, 2005 Report Share Posted March 23, 2005 -x, --one-file-system stay on this file system what does it do? iphitus <{POST_SNAPBACK}> It means that only files residing on the source's partition will be copied. For example, if a subdirectory is actually a mount or a link to another partition, then it will not be copied. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.