Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
排除多个文件夹(bash)_Bash_Shell - Fatal编程技术网

排除多个文件夹(bash)

排除多个文件夹(bash),bash,shell,Bash,Shell,如何使用find排除多个目录 排除一个文件夹 find * -mindepth 0 -maxdepth 0 -not -name first_folder 尝试类似于: find * -mindepth 0 -maxdepth 0 -not -name first_folder -or -not -name second_folder 多个-不起作用,只需删除-或 find * -mindepth 0 -maxdepth 0 -not -name first_folder -not -nam

如何使用find排除多个目录

排除一个文件夹

find * -mindepth 0 -maxdepth 0 -not -name first_folder
尝试类似于:

find * -mindepth 0 -maxdepth 0 -not -name first_folder -or -not -name second_folder

多个
-不起作用,只需删除
-或

find * -mindepth 0 -maxdepth 0 -not -name first_folder -not -name second_folder

谢谢,这很有效。我在关注一个tuturial博客:上面说你需要把一些事情分组,比如。(-not-name first_folder-或-not-name second_folder)这对我不起作用,bash只是跳过了它。