用find命令查找时
例如命令

  

会出错,查文档找出
find: paths must precede expression
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec]
[path…] [expression]
This happens because *.c has been expanded by the shell resulting in find
actually receiving a command line like this:

  

   find . -name bigram.c code.c frcode.c locate.c -print

That command is of course not going to work. Instead of doingthings
this way, you should enclose the pattern in quotes or escape the wildcard:

     $ find . -name '*.c' -print

$ find . -name \*.c -print
   即出现这个提示是因为星号代表为当前目录下所有的文件,然后被当做shell展开
这就是网上说的多文件的查找的时候需要增加单引号

find: paths must precede expression问题及解决的更多相关文章

  1. 解决find命令报错: paths must precede expression(转)

    原文地址:https://www.cnblogs.com/peter1994/p/7297656.html 在一天早上,想在服务器 /tmp 目录清除一些pdf文件,大概一万多个文件,在执行命令的时候 ...

  2. linux /bin/find 报错:paths must precede expression 及find应用

    1.问题描述,运行下面的命令,清楚日志 [resin@xx ~]$ ssh xxx  "/usr/bin/find /data/logs/`dirname st_qu/stdout.log` ...

  3. find 报错 find: paths must precede expression:

    编写shell脚本,报错,如下面 [root@localhost backup]#find ./ -name mysqldump* -mtime +3 -delete [root@localhost ...

  4. find: paths must precede expression(转)

    find: paths must precede expressionUsage: find [-H] [-L] [-P] [path...] [expression] 然后就上网查了一下,结果搜索到 ...

  5. find: paths must precede expression

    郁闷了今天进行如下的查询居然报告错误, [root@localhost /]# find /root/ -name *.txtfind: paths must precede expressionUs ...

  6. 解决find命令报错: paths must precede expression

    eg: find . -name *.c -or -name *.cpp 需要将模糊搜索词用引号括起来: find . -name "*.c" -or -name "*. ...

  7. [bug] Shell:paths must precede expression

    参考 https://www.cnblogs.com/peter1994/p/7297656.html

  8. 《LeetBook》leetcode题解(10): Regular Expression Matching——DP解决正则匹配

    我现在在做一个叫<leetbook>的免费开源书项目,力求提供最易懂的中文思路,目前把解题思路都同步更新到gitbook上了,需要的同学可以去看看 书的地址:https://hk029.g ...

  9. linux 常用命令学习记录

    rm -f *.sh 2.grep -rn "enng" * 查找文件内容包含enng的文件(注意:文件名有xian的不会查询出) find . ! -name "*.s ...

随机推荐

  1. iOS项目之获取WebView的高度

    获取高度值的方法: - (void)webViewDidFinishLoad:(UIWebView *)webView { // 获取webView的高度 CGFloat webViewHeight ...

  2. CAN control

    2019/4/23--10:14 E_BSW_NWK_TRIGGER_SOURCE_KICK_MOTION_CMD SCI_NwkButton_GetPeriodicSignals case 6:   ...

  3. Html h1-h6 标签

    Html h1-h6 标签 <html> <body> <!-- h1-h6标签:标题标签 --> <h1>XSK</h1> <h2& ...

  4. mysql常用的查询优化

    原文链接:https://www.jb51.net/article/39221.htm 1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2 ...

  5. C# 图片缩略图

    /// <summary> /// 生成缩略图 /// </summary> /// <param name="sourceFile">原始图片 ...

  6. spring-cloud-config-server——Environment Repository(Git Backend)

    参考资料: https://cloud.spring.io/spring-cloud-static/spring-cloud-config/1.4.0.RELEASE/single/spring-cl ...

  7. jquery将表单序列化

    在工作中经常要将表单数据通过ajax提交,所以需要将表单序列化为json对象. 已经有大神提供了,以前一直百度,现在决定抄过来收藏一下,方便以后自己用,尊重原创,文章转载自:http://www.cn ...

  8. Web版记账本开发记录(五)

    今天是第五天,不过今天有点事什么都没做,只是看了看一些教学视频, 今天家里有事, 还没来得及实践,等明天再实践,然后再完善完善.

  9. Struts2中 Action class not found 问题

    刚学Struts2时碰到了以下两个问题,都是没有正确配置struts.xml导致的,自己记录一下: 1.浏览器报404:The origin server did not find a current ...

  10. 『Python CoolBook』C扩展库_其五_C语言层面Python库之间调用API

    点击进入项目 一.C层面模块添加API 我们仍然操作如下结构体, #include <math.h> typedef struct Point { double x,y; } Point; ...