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 ...
随机推荐
- random模块写的验证码
import randomabc=''for i in range(4): a=random.randrange(0,4) if i != a: b=chr(random.r ...
- laravel中empty(),is_null() 以及isEmpty()
PHP中 empty() empty() 函数用于检查一个变量是否为空. if(empty($result->order)){ //操作 } is_null() is_null() 函数用于检测 ...
- 洛谷 P1856 【Picture】
题目描述 N(N<5000) 张矩形的海报,照片和其他同样形状的图片贴在墙上.它们的边都是垂直的或水平的.每个矩形可以部分或者全部覆盖其他矩形.所有的矩形组成的集合的轮廓称为周长.写一个程序计算 ...
- iOS关于直播的链接
iOS关于直播集成的链接 http://www.jianshu.com/p/7b2f1df74420 https://www.cnblogs.com/graveliang/p/5683617.html ...
- js日期的格式化
我们看控制台打印的关于Date这个类 我们这里可以看到内置方法没有类似format这种方法,所以需要自己定义. 内置的方法: var myDate = new Date();myDate.getYea ...
- js在线富文本插件的考虑
使用之前需要考虑的点: 1需要插件,是否需要很多的插件,还是说简单的那些功能就行了. 2界面考虑,看你喜欢那个界面了. 3图片是否需要上传图片服务器. 4文档如果为英文是否会影响开发. 5支持浏览器类 ...
- UGUI之导入图片之前自动设置图片打包的 tag
之前一直在用的是NGUI,最近不知怎么突然兴趣来潮,想学习一下UGUI,毕竟,现在纵观Unity的市场,完全是UGUI的天下,NGUI已经渐渐退隐江湖,哈哈哈... 先来记录下,在图片资源导入到Uni ...
- 做h5动画会用到的一个很好的缓动算法库
http://www.zhangxinxu.com/wordpress/2016/12/how-use-tween-js-animation-easing/
- python和jupyter安装
python官网:https://www.python.org/ 进去之后选择适合自己电脑的系统类型,安装,我的是windows 下载之后,双击打开 在安装时请勾选上add to path 选项,安 ...
- day34 GIL锁 线程队列 线程池
一.Gil锁(Global Interpreter Lock) python全局解释器锁,有了这个锁的存在,python解释器在同一时间内只能让一个进程中的一个线程去执行,这样python的多线程就无 ...