开发者

List all files in all subdirectories NOT having specified file permissions

I need to see all files (with full pathname), along with their file permissions, on a folder which DO NOT match

-rw-r--r--

This didn't work as I thought it should have:

#开发者_StackOverflowls -laR | grep --invert-match '-rw-r--r--'
grep: invalid option -- -


You need to backquote all -:

#ls -laR | grep --invert-match '\-rw\-r\-\-r\-\-'


find . -maxdepth 1 \! -perm 0664 -printf '%M\t%P\n'

Modify format string as desired.


ls -laR | grep -- "-rw-r--r--"

but you really should use GNU find.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜