Creating archives with tar

Creating archives with tar

Post by -*MaRc* » Fri, 13 Jun 1997 04:00:00



Hi, how do I create an archive with tar in ksh? I've tried

        $ tar -cvf - <the directory I want to archive>
        $ tar -cvf <the directory I want to archive>

                                Marc

 
 
 

Creating archives with tar

Post by Herve Couppe de Lahongrais - CD » Fri, 13 Jun 1997 04:00:00



> Hi, how do I create an archive with tar in ksh? I've tried

>         $ tar -cvf - <the directory I want to archive>
>         $ tar -cvf <the directory I want to archive>

>                                 Marc

You need to specify the archive tar file before the directory you want
to archive.

Suppose you want to archive the directory /home/users/foo in
/usr/tmp/foo.tar. Use the following command :

tar cvf /usr/tmp/foo.tar /home/users/foo

or

cd /home/users; tar cvf /usr/tmp/foo.tar foo

--
Herve Couppe de Lahongrais (SEU)       | Eurocontrol Experimental Centre