Thursday, June 30


Create tape archives and add or extract files.
Note: A ".tar" file is not a compressed files, it is a collection of files within a single file uncompressed. If the file is a .tar.gz ("tarball") or ".tgz" file it is a collection of files that is compressed. If you are looking to compress a file you would create the tar file then gzip the file.

How to tar a file

 SYNTAX:  
 tar  -cvf  < filename >.tar  /< File directory location >/

 Example: 
 tar -cvf domainconfig_bms.tar domainconfig
 tar -cvwf file.tar myfile.txt

  • c – create a new archive
  • v – verbosely list files which are processed.
  • f – following is the archive file name
  • z – filter the archive through gzip 
  
How to untar a file

SYNTAX: 
tar  -xvf  < filename >.tar
tar  -xvwzf myfile.tar
tar  -xvwzf myfile.tar.gz 


Example: tar –xvf  domainconfig_bms.tar

No comments:

Post a Comment