目前:
$ find -type d
./a
./a/sub
./b
./b/sub
./b/sub/dub
./c/sub
./c/bub
Run Code Online (Sandbox Code Playgroud)
我需要:
$ find -type d -not -contains -type d
./a/sub
./b/sub/dub
./c/sub
./c/bub
Run Code Online (Sandbox Code Playgroud)
如何排除包含其他(子)目录但不为空(包含文件)的目录?