UNIX SHELL SCRIPT help?怎样找出当前目录下属性不是0444的文件?
要求:
1. 限于.c和.h文件。
2. 要能recursively搜索,即搜索当前目录下的所有目录和文件,
symbolic link的文件可以不查。
哪位大侠能帮我写一个这样的script?
谢谢。
[john124 (10-22 15:43, Long long ago)]
[ 传统版 |
sForum ][登录后回复]1楼
use findto check how to use find, try man find
the following command will list all .c and .h find in current folder. Recursively!
find ./ -iname "*.[c|h]" -perm 0444 -exec ls -al {} \;
[Cowboy (10-25 3:15, Long long ago)]
[ 传统版 |
sForum ][登录后回复]2楼
(引用 Cowboy:use findto check how to use find, try man find the following command will list all .c and .h find in current folder. Recursivel...)thanks a lot.You are a lot help. :)[john124 (10-29 12:21, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼