find . -name *.c find: paths must precede expression:

今天在使用find时遇到一个错误:

find . -name *.c
find: paths must precede expression: ext2fs.c
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

网上搜索该问题,普遍解释如下:

*.c被展开,所以出现错误。正确的用法是find . -name '*.c'


如下地址的分析比较靠谱

http://blog.csdn.net/zhuying_linux/article/details/7610416

你可能感兴趣的:(find . -name *.c find: paths must precede expression:)