UNIX SHELL SCRIPT help?怎样找出当前目录下属性不是0444的文件?
要求:
1. 限于.c和.h文件。
2. 要能recursively搜索,即搜索当前目录下的所有目录和文件,
symbolic link的文件可以不查。
哪位大侠能帮我写一个这样的script?
谢谢。
use find
to 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 {} \;
the following command will list all .c and .h find in current folder. Recursively!
find ./ -iname "*.[c|h]" -perm 0444 -exec ls -al {} \;