Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 shell 中,如何使用 echo 在当前目录中查找名称至少包含 2 个字符但不包含 cs 的文件。
Try this.
$ find . -name "*??*" -not -name "*cs*"
If you are interested only in the files in the current directry, and don't want to traverse to subdirectories, try the following.
$ find . -maxdepth 1 -name "*??*" -not -name "*cs*"