Linux檔案打包成不同字尾的壓縮檔案
tar
tar cvf filename.tar /dir
.tar.gz
tar czvf filename.tar.gz /dir
.tgz
tar cvzf filename.tgz /dir
.tar.gz2
You probably mean .tar.bz2
.tar.bz
tar cjvf filename.tar.bz /dir
.tbz
tar cjvf filename.tbz /dir
.tar.bz2
tar cjvf filename.tar.bz2 /dir
.tar.Z
.Z is an old naming convention which has moved to .gz. See .tar.gz above.
.tar.xz
tar cvf - filenames | lzma > filename.tar.xz
.gz
gzip filename
.gz2
You probably mean .bz2
.bz
bzip filename
.bz2
bzip2 filename
.Z
.Z is an old naming convention which has moved to .gz. See .gz above.
.xz
lzma filename
.zip
zip -r filename.zip /dir
.7z
7z a -t7z filename.7z /dir
.rar
rar a filename.rar /dir
.dmg
This is a bit more complicated than what I have time for. Looks like somebody has already figured something out.
.dd
Create these image files using: dd if=inputfile.dd of=outputfile.dd