ChinaUnix.net
相关文章推荐:

find 只显示 结果

如何使用find 只显示第一条匹配内容 :D

by yzjboy - Shell - 2003-10-21 14:38:54 阅读(2092) 回复(4)

相关讨论

find出来的结果想赋值给数组使用 find . -type f -printf "%u %g %p\n" 查找出来的结果如下 user1 group1 file1 user2 group2 file2

by ayalastrike - Shell - 2009-05-14 10:52:41 阅读(3159) 回复(1)

我用 find / -name bash |grep -v "Permission denied" 想过滤permission denied那些信息,结果发现不行。 用shell想重定向再过滤,结果还是不行,执行后tmp里面内容为空,结果还是全部输出到屏幕上。 find / -name bash > tmp cat tmp|grep -v "Permission denied" 请高手帮我解释原因,谢谢!

by zhyuh - Shell - 2004-07-05 22:03:40 阅读(1912) 回复(5)

如何将find语句搜出的文件,只显示其文件名,而不显示路径名。 如用 find . -name '#.c' -print 则输出: ./proj/fall.89/paly.c ./proj/fall.89/refe.c ./rock/guess.c 如何才能将其只显示出如: paly.c refe.c guess.c 而不显示出路径名。 请大侠们帮忙啊。。谢谢啊

by daniel_82 - Shell - 2005-06-18 10:26:01 阅读(12829) 回复(20)

[code]find / -name db2level|sh [/code] 这样的话,有些错误。 因为find结果里包含类似于“/proc/28686”的结果。直接送给去执行的话,会得到错误。 [code] # find / -name db2level|sh DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL09050" with level identifier "03010107". Informational tokens are "DB2 v9.5.0.0", "s071001", "AIX6495", and Fix Pack "0". Product is installed at "/opt/IB...

by ncowboy - Shell - 2009-06-25 08:53:38 阅读(1442) 回复(1)

写了一个简单的脚本:在一个目录下找到class为名的子目录,然后清空class下固定的三个目录 我用find命令将找到的class目录赋值给变量,然后进行操作。前提是目录下只有一个class目录。 现在的问题是如果有多个class目录该怎么做,才能对所有class子目录一一操作。 小弟初学Shell,请大家帮忙。谢谢!

by assassincl - Shell - 2009-02-11 11:46:02 阅读(1899) 回复(5)

[/home/test/testdb]>l -rt total 13037546 -rw-r--r-- 1 test test 135139200 May 21 11:35 test05211 -rw-r--r-- 1 test test 237231200 May 22 11:16 test05221 -rw-r--r-- 1 test test 338846720 May 23 11:16 test05231 -rw-r--r-- 1 test test 139623568 May 24 11:16 test05241 -rw-r--r-- 1 test test 239747840 May 25 11:16 test05251 -rw-r--r-- 1 test test 340751360 May 26 11:16 test05261...

by sqlnet - Shell - 2008-05-30 11:00:16 阅读(1410) 回复(1)

忘记怎么提取了,请帮下忙 要把 find / -name "*.c" 的结果去掉路径,只留下最后的文件名。 如: /usr/src/redhat/SOURCES/file.c 我现在要去掉/usr/src/redhat/SOURCES 只需要file.c 请帮忙!谢谢

by zxr1018 - Shell - 2008-01-30 09:55:59 阅读(2994) 回复(8)

我的原意是想看a.txt文件是否存在。 if 存在 then do something else another things fi 用$(find path -name "a.txt") ,怎样做为判断条件

by jx00p - Shell - 2007-11-19 12:49:55 阅读(6327) 回复(35)

[abc@vs0 test]$ ll total 16 -rw-r--r-- 1 root root 2 Apr 23 11:08 a -rw-r--r-- 1 root root 2 Apr 23 11:08 b -rw-r--r-- 1 root root 2 Apr 23 11:08 c -rw-r--r-- 1 root root 2 Apr 23 11:08 d -rw-rw-r-- 1 abc abc 0 Apr 23 11:19 e -rwxrwxrwx 1 abc root 0 Jun 1 16:43 ss -rwSr-Sr-T 1 root root 0 Jun 1 16:31 tt [abc@vs0 test]$ find -type f -perm +0444 ./a ./b ./c ./ss ./e ./tt ./d [abc@vs0 test]$ fin...

by zcsgamer - Shell - 2009-06-19 17:23:33 阅读(2054) 回复(7)

find /var/web -type f -mtime -1 -exec tar -czvf $(date +%Y%m%d).tar.gz {} \; 查询web目录下最近一天修改的文件,然后打包。能正常运行,但是最终结果只有一个文件被打包进去了。什么原因引起的?怎么解决?谢谢!!

by wuyuhua_2000 - Shell - 2009-09-02 15:50:48 阅读(1291) 回复(3)