用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. 洛谷P2820 局域网 (最小生成树)

    题目链接:https://www.luogu.org/problemnew/show/P2820 题目背景 某个局域网内有n(n<=100)台计算机,由于搭建局域网时工作人员的疏忽,现在局域网内 ...

  2. Oracle数据库管理----性能优化

    https://blog.csdn.net/yzllz001/article/details/54848513 数据库访问优化法则   要正确的优化SQL,我们需要快速定位能性的瓶颈点,也就是说快速找 ...

  3. Appium+python自动化1-环境搭建(上)

    前言 appium可以说是做app最火的一个自动化框架,它的主要优势是支持android和ios,另外脚本语言也是支持java和Python.小编擅长Python,所以接下来的教程是appium+py ...

  4. RXD, tree and sequence IN HDU6065

    解这道题绕了好多弯路...先是把"depth of the least common ancestor"这句话忽视掉,以为是最深点与最浅点的深度差:看到某人题解(的开头)之后发现自 ...

  5. jQuery 位置

    jQuery 位置 // 默认窗口 $(window) // 查看.指定标签上下滚轮的位置数 $('#id').scrollTop() // 设置.指定标签上下滚轮的位置数 $('#id').scro ...

  6. Docker Compose 配置文件常用指令

    Docker Compose 配置文件常用指令 YAML文件格式及编写注意事项 YAML是一种标记语言很直观的数据序列化格式,可读性高.类似于XML数据描述语言,语法比XML简单的很多. YAML数据 ...

  7. (转)GANs and Divergence Minimization

    GANs and Divergence Minimization 2018-12-22 09:38:27     This blog is copied from: https://colinraff ...

  8. Memcache_分布式缓存

    一. Memcache简介 1. 什么要用到Memcache以及该能解决什么问题 高并发访问数据库的痛楚:死锁! 磁盘IO之痛 多客户端共同缓存 NET+Memory>>IO 读写性能完美 ...

  9. MVC _Ajax的使用【七】

    一.本篇主要写的是在MVC项目中一种ajax的使用方法 1.  首先在控制器中创建两个方法,showCreate()和AddUserInfo() using System; using System. ...

  10. Jfinal集成Spring

    JFinal框架也整合了spring框架,下面实现JFinal怎么去配置Spring框架.在JFinal中整合Spring使用到的类是SpringPlugin和IocInterceptor类 Spri ...