且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 Unix 上找到不以特定扩展名结尾的文件名?

更新时间:2022-05-28 08:07:12

或者不用 ( 并且需要转义它:

Or without ( and the need to escape it:

find . -not -name "*.exe" -not -name "*.dll"

并排除目录列表

find . -not -name "*.exe" -not -name "*.dll" -not -type d

或正逻辑;-)

find . -not -name "*.exe" -not -name "*.dll" -type f