如果find多个文件, 需要用引号括起来.
$ touch test.txt
$ find .
.
./test.txt
$ find . -name *.txt
./test.txt
$ touch test1.txt
$ find . -name *.txt
find: paths must precede expression
Usage: find [path...] [expression]
$ find . -name "*.txt"
./test.txt
./test1.txt
--End--
$ touch test.txt
$ find .
.
./test.txt
$ find . -name *.txt
./test.txt
$ touch test1.txt
$ find . -name *.txt
find: paths must precede expression
Usage: find [path...] [expression]
$ find . -name "*.txt"
./test.txt
./test1.txt
--End--
转载于:https://blog.51cto.com/56214415/369409