Linux « チョコポン!! | HOME | 攻撃力UP!!! »
■ Compress & Extract
How to comparess and extract a file on Linux.
ZIP
- compress -
# zip file.zip file_name
-r : Compress folders and files recursively
-q : Not show the proceess (quiet)
Add file.txt to the existing zip file.
# zip file.zip file.txt
- extract -
# unzip file.zip
-l : Show the extracted file list
TAR
- compress (packaging) -
# tar cvf file.tar file_name
- extract -
# tar xvf file.tar
GZ (gunzip)
- compress -
Gunzip can compress only single file. Not directry.
If you want to compress directory, use combination with TAR.
# tar czvf file.tar.gz dir_name
- extract -
# gunzip file.gz
or
# gzip -d file.gz
If you want to extrct TAR.GZ file,
# tar xzvf file.tar.gz
投稿者 tomopugh : 2007年10月30日 14:21

