最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
linux中tar压缩时排除某些目录或文件
时间:2022-11-14 22:07:55 编辑:袖梨 来源:一聚教程网
在对某个目录进行压缩的时候,有时候想排除掉某个目录,示例如下:
比如文件目录包含以下文件及目录
代码如下 | 复制代码 |
api api/addons api/connect api/connect/connect.php api/google api/remote api/remote/mod |
我们要压缩不包含google文件夹、connect/connect.php以及remote下mod文件夹
代码如下 | 复制代码 |
tar -zcvf mytest.tar.gz api --exclude=google --exclude=connect/connect.php --exclude=remote/mod |
【注意:1、--exclude=file1 而不是 --exclude file1 2、要排除一个目录是--exclude=dir1而不是--exclude=dir1/】
相关文章
- 《浩劫前夕》攻略 简评+配置+下载 05-12
- 《夜族崛起》正式版最佳建家位置推荐 05-12
- 《夜族崛起》吸血鬼猎人位置介绍 05-12
- 《夜族崛起》新版本内容介绍 05-12
- 《非生物因素》制作食物方法 05-12
- 《梦幻引擎游牧城市》正式版新增内容 05-12