尝试将其用引号引起来-您正在运行Shell的通配符扩展,因此您通过传递的内容看起来像:
find . -name bobtest.c cattest.c snowtest.c
…导致语法错误。因此,请尝试以下操作:
find . -name '*test.c'
请注意文件表达式周围的单引号-这些引号将阻止Shell(bash)扩展通配符。

尝试将其用引号引起来-您正在运行Shell的通配符扩展,因此您通过传递的内容看起来像:
find . -name bobtest.c cattest.c snowtest.c
…导致语法错误。因此,请尝试以下操作:
find . -name '*test.c'
请注意文件表达式周围的单引号-这些引号将阻止Shell(bash)扩展通配符。