tar 命令
tar:压缩/解压命令 对应gzip格式(表现为tar.gz)
压缩:tar -czvf 要压缩成的文件名称 被压缩的文件
例如:
tar -czvf 123.tar.gz 123.txt
解压:
tar -xzvf 要解压的文件名称
例如:
tar -xzvf 123.tar.gz
c:创建压缩
x:解压缩
z:压缩/解压gzip格式的文件
v:显示压缩/解压的过程
f:必定参数,后面接压缩文件名
zip命令
zip:压缩/解压 格式.zip
压缩:
例:[root@localhost ~]# zip lemon.zip lemon.txt
解压:
例:[root@localhost ~]# unzip lemon.zip