我正在练习一个find命令和时刻,并对命令中正则表达式的用法感到好奇find(类似于grep)。命令支持吗?如果是这样,启用它的选项是什么?
我尝试在man页面中寻找它,但到目前为止没有成功。
sch*_*ity 11
从 man find:
-regex pattern
File name matches regular expression pattern. This is a match
on the whole path, not a search. For example, to match a file
named `./fubar3', you can use the regular expression `.*bar.' or
`.*b.*3', but not `f.*r3'. The regular expressions understood
by find are by default Emacs Regular Expressions, but this can
be changed with the -regextype option.
Run Code Online (Sandbox Code Playgroud)