copy file using tar

We assume /source/dir is a filesystem, if there are other filesystems under /source/dir they
will also be copied to /destination/dir

cd /source/dir
tar -cf - . | ( cd /destination/dir ; tar -xpvf - )

你可能感兴趣的:(File)