Linux 常用命令
Linux 常用命令
#### Linux 常用命令
1.解压缩
.zip.rar #windows系统中压缩文件的扩展名
.tar #Linux中打包文件的扩展名
.gz #Linux中压缩文件的扩展名
.tar.gz #Linux中打包并压缩文件的扩展
Usage:
tar [OPTION...] [FILE]... #打包压缩后的文件名 要打包的文件
Examples:
tar -zcvf a.tar.gz b.tar,... #多个文件压缩打包 将 b.tar等 打包成 a.tar
tar -zxvf a.tar.gz #解包至当前目录
tar -zxvf a.tar.gz -C ./... #解包至指定目录
-z, --gzip, --gunzip, --ungzip #filter the archive through gzip 调用gzip解压缩
-c, --create #create a new archive 打包
-x, --extract, --get #extract files from an archive 解包
-f, --file=ARCHIVE #use archive file or device ARCHIVE 指定文件名
-C, --directory=DIR #change to directory DIR
unzip test.zip #解压*.zip文件
unzip -l test.zip #查看*.zip文件的内容