相关疑难解决方法(0)

find 命令中通配符的奇怪行为

globbing 是 shell 的一个特性吗?

我学会了如何在 find 命令中使用通配符,但今天我看到了一个奇怪的行为。

当我在搜索位置以外的任何地方时,我不需要单引号或双引号进行通配

$ pwd
/home
$ find / -name *c
...
it is ok
Run Code Online (Sandbox Code Playgroud)

$ pwd
/
$ find / -name *c
find: paths must precede expression: proc
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
Run Code Online (Sandbox Code Playgroud)

发生什么事?

command-line bash find

3
推荐指数
1
解决办法
1138
查看次数

标签 统计

bash ×1

command-line ×1

find ×1