use tar, gzip, and bzip2

gzip and bzip2  ( 2 ways to compress file)

compress a big picture file.
# gzip big.jpg
# bzip2 big.jpg
It adds a .gz or a .bz2 suffix to the file, compressed to the associated algorithms.
You can uncompress from these files with the -d switch:
# gzip -d big.jpg.gz
# bzip2 -d big.jpg.bz2

backs up the information from the /home directory in the home.tar.gz file:
# tar czvf home.tar.gz /home
extract (x) from that file with the following command:
# tar xzvf home.tar.gz /home

cd /home
tar -xvzf home.tar.gz
#. /home/stud1/wang目录做归档压缩,压缩后生成wang.tar.gz文件,并将此文件保存到/home目录下,实现此任务的tar命令格式 tar zcvf /home/wang.tar.gz /home/stud1/wang