tar and untar

Create archive

  • -z: Compress archive using gzip program
  • -c: Create archive
  • -v: Verbose i.e display progress while creating archive
  • -f: Archive File name
tar -zcvf archive.tar.gz /home/dir_to_archive

 

Untar archive

  • -x: Extract files
tar -zxvf archive.tar.gz

 

List content of archive

tar -tvf file.tar

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *