免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1428 | 回复: 9
打印 上一主题 下一主题

find查找问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-04-29 10:19 |只看该作者 |倒序浏览
如何查找当前用户下所有以.sh结尾的shell脚本:
   find . -name *.sh
只能查找当前目录下的的.sh脚本,深一层的就无法找到???????

论坛徽章:
0
2 [报告]
发表于 2010-04-29 10:20 |只看该作者
[root@commserver: /tmp]#find . -name "*.txt"
./test49.txt
./test39.txt
./test43.txt
./test51.txt
./test27.txt
./test57.txt
./test33.txt
./test22.txt
./test20.txt
./test38.txt
./test11.txt
./test50.txt
./test26.txt
./test31.txt
./test55.txt
./test21.txt
./test46.txt
./test45.txt
./test23.txt
./test/a.txt
./test35.txt
./test44.txt
./test19.txt
./test36.txt
./test16.txt
./test58.txt
./test13.txt
./test37.txt
./test14.txt
./test53.txt
./test47.txt
./test25.txt
./test15.txt
./test41.txt
./test48.txt
./a/WEB-INF/lib/.svn/README.txt
./a/WEB-INF/.svn/README.txt
./a/META-INF/.svn/README.txt
./a/content_lib/.svn/README.txt
./a/log/.svn/README.txt
./a/temp/.svn/README.txt
./a/admin/.svn/README.txt
./a/content/.svn/README.txt
./a/images/.svn/README.txt
./test56.txt
./test24.txt
./test28.txt
./test40.txt
./test18.txt
./test54.txt
./test34.txt
./test32.txt
./test60.txt
./test52.txt
./test30.txt
./test29.txt
./test17.txt
./test59.txt
./test42.txt

论坛徽章:
0
3 [报告]
发表于 2010-04-29 10:20 |只看该作者
回复 1# z1s8h5
如何查找当前用户下所有以.sh结尾的shell脚本:
   find . -name *.sh


    当前用户?你要知道当前用户自己有那些目录

论坛徽章:
0
4 [报告]
发表于 2010-04-29 10:23 |只看该作者
兰州打错了吧,说的应该是当前目录

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
5 [报告]
发表于 2010-04-29 10:25 |只看该作者
回复 1# z1s8h5


    name后面的那串东西要引用。

论坛徽章:
0
6 [报告]
发表于 2010-04-29 10:34 |只看该作者
回复 3# wtuter


    查找当前用户所有脚本,
谢谢,已解决

论坛徽章:
0
7 [报告]
发表于 2010-04-29 10:35 |只看该作者
回复 5# blackold


    没错,看了回帖才知道。

论坛徽章:
0
8 [报告]
发表于 2010-04-29 10:41 |只看该作者
回复 6# z1s8h5


     -user uname
              File is owned by user uname (numeric user ID allowed).

论坛徽章:
0
9 [报告]
发表于 2010-04-29 12:44 |只看该作者
回复 2# iori809


    谢谢!

论坛徽章:
1
天秤座
日期:2013-10-23 13:20:42
10 [报告]
发表于 2010-04-29 14:51 |只看该作者
就是就是shell将 *给替换了,没有传给find了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP