Linux常用命令02压缩及解压

#.tar
tar xvf FileName.tar
tar cvf FileName.tar FolderName

#.gz
gzip -d FileName.gz
gzip FileName

#.tar.gz
tar zxvf FileName.tar.gz
tar zcvf FileName.tar.gz FolderName

#.bz2
bzip2 -d FileName.bz2
bzip2 -z FileName

#.tar.bz2
tar jxvf FileName.tar.bz2
tar jcvf FileName.tar.bz2 FolderName

#.Z
uncompress FileName.Z
compress FileName

#.tar.Z
tar Zxvf FileName.tar.Z
tar Zcvf FileName.tar.Z FolderName

#.zip
unzip FileName.zip
zip -r FileName.zip FolderName

Comments are closed.