254 720 730035

Home » How to » How to tar a directory in Unix or Linux

How to tar a directory in Unix or Linux

You need to use the tar command as follows (syntax of tar command):
tar -zcvf archive-name.tar.gz directory-name
Where,

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

Leave a Reply

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