On-the-fly tar

If you want to copy a directory recursively and preserve exact file timestamps, ownerships, and permissions you can do an on-the-fly tar:

cd source-directory
tar cf - . | (cd destination-directory; tar xf -)
This entry was posted in system administration. Bookmark the permalink.