On Tuesday, 29th March 2005, Peter Jeremy wrote: >Brian missed a pair of parenthenis. The example should read: > >( cd srcdir ; tar cf - . ) | ( cd destdir ; tar xpf - ) Tar is indeed a most excellent program for copying directory trees, since even in this modern century cp fails to correctly handle hard links. Sigh. Still, if you are using tar, be sure to use it correctly: ( cd srcdir && tar cf - . ) | ( cd destdir && tar xpf - ) You don't want it going off in the current directory and mangling things just because of a little typo in a directory name. Stephen. PS If I'm right, the new tar fixes something gtar got wrong: setting permissions on "." when it is part of the archive, which of course it is when you copy directories in this way. This may surprise new users, even though it is the only sensible result. PPS Who's for adding a "cp -h" option to copy preserving hard links?Received on Wed Mar 30 2005 - 09:39:51 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:30 UTC