Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash 在shell中,如何使用echo在当前目录中查找至少包含2个字符但不包含cs的文件_Bash_Shell_Echo - Fatal编程技术网

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

Bash 在shell中,如何使用echo在当前目录中查找至少包含2个字符但不包含cs的文件,bash,shell,echo,Bash,Shell,Echo,在shell中,如何使用echo在当前目录中查找名称至少包含2个字符但不包含cs的文件。试试这个 $ find . -name "*??*" -not -name "*cs*" 如果您只对当前目录中的文件感兴趣,并且不想遍历到子目录,请尝试以下操作 $ find . -maxdepth 1 -name "*??*" -not -name "*cs*"

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

试试这个

$ find . -name "*??*" -not -name "*cs*"
如果您只对当前目录中的文件感兴趣,并且不想遍历到子目录,请尝试以下操作

$ find . -maxdepth 1 -name "*??*" -not -name "*cs*"