Tag Archives: tar command

Quick tips: Compress/Extract Linux directory with Tar command

To compress:

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

To Extract:

tar -zxvf archive-name.tar.gz /to/bath/directory-name
    -z: Compress archive using gzip program
    -x: Extract files
    -v: Verbose i.e display progress while creating archive
    -f: Archive File name