Monday, 23 July 2012

Using tar commands in Linux


tar =  this command is used to create a archive / backup / a bundle of any file or a dir.We can create a tar file of any file or dir.  The command is


(i)         tar cvf  file1.tar  testdir

                              OR

                 #  tar  cvf  /dev/st0  testdir  (  we can create a tar archive in a device also ).

  

  Note :---- “  .tar  “ extension is not compulsory .
 
     c = create a new archive.

    v = produces verbose message.

  f =  file1.tar (  archive name ) is name of new file.




(ii)  tar tvf file1.tar

   
  (  This command is used to see the original file name or dir name and  path of tar archive or tar file ).


(ii)       tar xvf  file1.tar
  
(  This command is used to untar a tar file ).

No comments:

Post a Comment