在对某个目录进行压缩的时候,有时候想排除掉某个目录,例如: 如果dir目录下有3个子目录,dir1、dir2、dir3。 我现在想只对dir1和dir2目录打包压缩,命令如下: tar -zcvf dir.tar.gz --exclude=dir3 dir 使用exclude参数来过滤不需要的目录或文件,排除某个文件的操作和目录一样。
- Home
- Technology
- Linux tar压缩时排除某个目录或文件的参数
You May Also Like
Posted in
Technology
How to hide users from GAL if they are AD Connect synchronized
Posted by
Jiajie
Posted in
IT operations
10 Open Source SIEM Tools
Posted by
Jiajie
More From Author
Posted in
Technology
How to hide users from GAL if they are AD Connect synchronized
Posted by
Jiajie