Friday, November 18, 2005

Notable tar Usages

From the gnu.org site:

For example, here is how you might copy a directory's contents from one disk to another, while preserving the dates, modes, owners and link-structure of all the files therein. In this case, the transfer medium is a pipe, which is one a Unix redirection mechanism:

$ cd sourcedir; tar -cf - . | (cd targetdir; tar -xf -)
 
Here's a sample: sudo tar cvzf /media/MyBook500-ext3/Volume/home-2007-10-20.tgz /home/

0 comments: