我有一个快速且可能容易解决的问题。我正在通过
列出目录列表 find ~/me/ -maxdepth 1 -type d -not -name "test1" -and -not -name "test4"
$ find ~/me/ -maxdepth 1 -type d -not -name "test1" -and -not -name "test4"
/home/me/
/home/me/test2
/home/me/test3
我想使用类似:find ~/me/ -maxdepth 1 -type d -not -name "test1" -and -not -name "test4" | xargs rm -rf
的东西,但是发现显示了我:/home/me根目录。
我正在寻找一种不包括在搜索结果中的方法。有提示吗?
-mindepth 1
不适合你?