On 15-Jan-2012 Laurie Brown wrote:
On 14/01/2012 22:33, (Ted Harding) wrote:
[SNIP]
That looks hopeful. I'll give it a try in the morning (once my caffeine levels are up). Ted.
I'd advise using tar too. These are from my notes:
---- cut here ---- #### To copy a directory tree with tar:
cd fromdir; tar cf - . | (cd todir; tar xfBp -)
copy all files and subdirectories in "fromdir" to "todir". Note target dir must exist. Note the use of "-" with pipe. N.B. this is how you move a directory between discs.
#### To copy all of the files and subdirectories in the current working directory to the #### directory /target, use:
tar cf - * | ( cd /target; tar xfp -) ---- cut here ----
Obviously, you need to add in the exclude part from Keith's suggestion.
Cheers, Laurie.
One question about this kind of approach. The above pipe is written as though the "tar cf - *" part is completed before the output is piped to the "( cd /target; tar xfp -)" part (I'm guessing this because of the "cd" element of the second part). So, supposing the tar archive from "tar cf - *" is very big (as it would be in this case, far exceeding the RAM and swap space), would that cause problems?
Ted. ---------------------------------- E-Mail: (Ted Harding) Ted.Harding@wlandres.net Date: 15-Jan-2012 Time: 13:09:14
This message was sent by XFMail ----------------------------------