This zips the directory and names it xyz.zip in

1
zip -r /home/user/xyz.zip /location/of/directory

This unzips the archive

1
unzip /home/user/xyz.zip

This tars the directory and names it xyz.tar in /home/user/

1
tar -cvf /home/user/xyz.tar /location/of/directory

This untars the archive

1
tar -xvf /home/user/xyz.tar -C /location/to/extract/to/

This tar.gzs the directory and names it xyz.tar.gz in /home/user/

1
tar -zcvf /home/user/xyz.tar.gz /location/of/directory

This untars the archive

1
tar -zxvf /home/user/xyz.tar.gz -C /location/to/extract/to/

Leave a Reply