`

find: paths must precede expression

 
阅读更多

郁闷了今天进行如下的查询居然报告错误,

[root@localhost /]# find /root/ -name *.txt
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
[root@localhost /]#

进行查找资料,多文件的查找的时候需要增加单引号

 

[root@localhost /]# find /root/ -name '*.txt'
/root/.mozilla/firefox/5w8zmvga.default/cookies.txt
/root/tomcat7.0/aa.txt
/root/tomcat7.0/apache-tomcat-7.0.11/logs/localhost_access_log.2011-04-13.txt
/root/tomcat7.0/apache-tomcat-7.0.11/logs/localhost_access_log.2011-04-21.txt
/root/tomcat7.0/apache-tomcat-7.0.11/logs/localhost_access_log.2011-04-22.txt
/root/tomcat7.0/apache-tomcat-7.0.11/RUNNING.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/docs/RUNNING.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/docs/appdev/sample/docs/README.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/docs/appdev/build.xml.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/docs/appdev/web.xml.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/docs/RELEASE-NOTES.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/docs/BUILDING.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/docs/architecture/startup/serverStartup.txt
/root/tomcat7.0/apache-tomcat-7.0.11/webapps/ROOT/RELEASE-NOTES.txt
[root@localhost /]#

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics