我看到这个命令:
tar cvfz ../xxx --exclude './yyy/**'
当使用这样的“tar cvfz ../xxx --exclude'./yyy/**'”时,排除在tar命令中做什么?
xxx和yyy是刚刚目录。
现在,我不明白什么是**之后--exclude参数?
我认为这种模式是部分shell!
我看到这个命令:
tar cvfz ../xxx --exclude './yyy/**'
当使用这样的“tar cvfz ../xxx --exclude'./yyy/**'”时,排除在tar命令中做什么?
xxx和yyy是刚刚目录。
现在,我不明白什么是**之后--exclude参数?
我认为这种模式是部分shell!
**
意思是“*递归”(在子目录中,不仅在目录本身),包括斜线。
foo/**/bar
在“foo”的任何子目录中的含义是“bar”。
来回焦油手册页:
--exclude pattern
Do not process files or directories that match the specified pattern.
因此,对于你的情况下,它是排除所有文件&子目录中yyy/
目录进一步回落通过指定排除模式为./yyy/**'
存档。