linux tar 压缩解压 打包解包

tar 常用参数, z 压缩文件  c打包  x解压  v 显示进度   f文件
-xvf  解包显示进度(只打包不压缩)
-cvf  打包显示进度
-zcvf 打包压缩显示进度
-zxvf 解压缩包显示进度

一,只打包不压缩

tar -cvf python.tar ./python
  解包

tar -xvf python.tar ./python
二,打包压缩

tar -zcvf python.tar.gz ./python
解压缩包

tar -zxvf python.tar.gz ./python
老忘记,记录在此,估计以后就不会忘记了

[root@localhost home]# ls
hbase  hull  lost+found  python  rocketmq  tair  zk
[root@localhost home]# tar -cvf python.tar ./python
./python/
./python/.bashrc
./python/.gnome2/
./python/.bash_logout
./python/.mozilla/
./python/.mozilla/extensions/
./python/.mozilla/plugins/
./python/.bash_profile
./python/first.py
[root@localhost home]# 
[root@localhost home]# tar -xvf python.tar ./python
./python/
./python/.bashrc
./python/.gnome2/
./python/.bash_logout
./python/.mozilla/
./python/.mozilla/extensions/
./python/.mozilla/plugins/
./python/.bash_profile
./python/first.py
[root@localhost home]# 





猜你喜欢

转载自blog.csdn.net/hulele2009/article/details/79175152