find: paths must precede expression问题及解决
用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问题及解决的更多相关文章
- 解决find命令报错: paths must precede expression(转)
原文地址:https://www.cnblogs.com/peter1994/p/7297656.html 在一天早上,想在服务器 /tmp 目录清除一些pdf文件,大概一万多个文件,在执行命令的时候 ...
- linux /bin/find 报错:paths must precede expression 及find应用
1.问题描述,运行下面的命令,清楚日志 [resin@xx ~]$ ssh xxx "/usr/bin/find /data/logs/`dirname st_qu/stdout.log` ...
- find 报错 find: paths must precede expression:
编写shell脚本,报错,如下面 [root@localhost backup]#find ./ -name mysqldump* -mtime +3 -delete [root@localhost ...
- find: paths must precede expression(转)
find: paths must precede expressionUsage: find [-H] [-L] [-P] [path...] [expression] 然后就上网查了一下,结果搜索到 ...
- find: paths must precede expression
郁闷了今天进行如下的查询居然报告错误, [root@localhost /]# find /root/ -name *.txtfind: paths must precede expressionUs ...
- 解决find命令报错: paths must precede expression
eg: find . -name *.c -or -name *.cpp 需要将模糊搜索词用引号括起来: find . -name "*.c" -or -name "*. ...
- [bug] Shell:paths must precede expression
参考 https://www.cnblogs.com/peter1994/p/7297656.html
- 《LeetBook》leetcode题解(10): Regular Expression Matching——DP解决正则匹配
我现在在做一个叫<leetbook>的免费开源书项目,力求提供最易懂的中文思路,目前把解题思路都同步更新到gitbook上了,需要的同学可以去看看 书的地址:https://hk029.g ...
- linux 常用命令学习记录
rm -f *.sh 2.grep -rn "enng" * 查找文件内容包含enng的文件(注意:文件名有xian的不会查询出) find . ! -name "*.s ...
随机推荐
- 软件工程---UML理解
1.依赖关系和关联关系 1.1依赖关系是调用关系,其又分为全局依赖.参数依赖.局部依赖 1.2关联关系是结构上的关系,按照关联的强弱又具体分为关联关系.聚合关系(整体和部分的组成关系.whole-pa ...
- Mybaties 实现批量修改
通常我们在做批量更新的时候都会用in 去操作,但in的数据量一上来,就变的缓慢了 修改方案: <update id="updateShufflingSeq" paramete ...
- 剑指offer(44)单词翻转序列
题目描述 牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上.同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思.例如,“student ...
- CEF 右键添加开发者选项菜单项
在项目开发过程中,有时候需要进行调试测试,然后我们可以在cef上下文菜单中添加自定义开发者工具菜单项,这样会比较方便,最后效果: 实现过程: 让自己的MyClientHandler来继承 CefCon ...
- BinaryTree
public class TreeNode { public int val; public TreeNode left; public TreeNode right; public TreeNode ...
- Python入门 函数式编程
高阶函数 map/reduce from functools import reduce def fn(x, y): return x * 10 + y def char2num(s): digits ...
- 【Entity Framework】Model First Approach
EF中的model first 所谓mf, 就是使用vs提供的edm designer去设计model,然后将设计好的model使用vs在指定的数据库中生成数据库即可. 当你的项目既没有数据库也没有c ...
- Static需谨慎
Static Cling Sticking Your Code To Things Unnecessarily Static Cling is a code smell used to describ ...
- vue2.0自学教程(一):走进vue2.0大观园
人狠话不多,咱直入主题吧! 开发软件: Visual Studio Code 支持环境: nodejs+windows 版本: vue2.0 1.初识vuevue是一个前端框架,使用MVVM(Mode ...
- 如何恢复IIS出厂默认设置
How to restore IIS settings and Default Web Site? http://superuser.com/questions/704850/how-to-resto ...