-2

在 shell 中,如何使用 echo 在当前目录中查找名称至少包含 2 个字符但不包含 cs 的文件。

4

1 回答 1

2

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*" 
于 2013-05-17T22:28:42.527 回答