我试图让Unix“查找”不在搜索特定文件时列出目录。
find <path> -name filename <Dont't list matching directories>
find <path> -name filename ! -type d
您可以使用-type参数,因此您可能希望包含-type f以仅匹配文件。
-type
-type f