我用这个:
$ find . -type d \( -path './2018*' -o -path "./S*" \) -prune\
-o -print
获取所有目录 ( -type d
) 不包括2018
,S1
和S2
目录的排除工作,但我得到了很多文件:
...
./git_wc
./budget
./budget/mail_0625
./budget/mail_0625/prez.pptx
./budget/budget_v2.xlsx
./budget/achats
./budget/achats/106-1396140_V1_20190731.pdf
./rh
./rh/file.docx
顺便说一句,我寻找一个纯粹的find
答案,我知道如何做到这一点tree
:
$ tree -d -L 2 -I 'S1|2018' -fi
...
./git_wc
./budget
./budget/mail_0625
./budget/achats
./rh
...