在使用linux的find命令使用通配符查找文档时,报告下面的错误:
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
直接使用通配符会报告上面的错误,我们可以在通配符表达式外添加单引号来解决上面通配符的问题。
例
[root@localhost test]# find /test -name '*.txt'
/test/4.txt
/test/6.txt
/test/aa/4.txt
/test/aa/1.txt
/test/3.txt
/test/2.txt
/test/5.txt