![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wild card in find perm | braindrain | Shell Programming and Scripting | 1 | 04-12-2007 07:24 PM |
| query about find and -exec | shriashishpatil | UNIX for Advanced & Expert Users | 2 | 04-12-2007 02:16 AM |
| Query regarding ksh | vaibhav | Shell Programming and Scripting | 4 | 04-08-2007 12:57 PM |
| perm bits | mpang_ | Shell Programming and Scripting | 1 | 02-10-2007 10:17 AM |
| change semaphore perm | FastMagister | High Level Programming | 5 | 06-07-2006 01:42 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
find -perm query
I was going through a find tutorial and just couldn't get it...can someone explain it like he/she would explain a brain damaged dodo?
"find allows you to specify a pattern that can be bit-wise ANDed with the permissions of the file. Simply put a minus sign before the octal value. The group write permission bit is octal 20, so the following negative value: find . -perm -20 -print will match the following common permissions: +-------------------------+ |Permission Octal value | +-------------------------+ |rwxrwxrwx 777 | |rwxrwxr-x 775 | |rw-rw-rw- 666 | |rw-rw-r-- 664 | |rw-rw---- 660 | +-------------------------+ If you wanted to look for files that you can execute, (i.e. shell scripts or programs), you want to match the pattern "--x------," by typing: find . -perm -100 -print When the -perm argument has a minus sign, all of the permission bits are examined, including the set user ID bits. " so the question is: what is the calculation behind the 20 in '-perm -20' and the 100 in '-perm -100'? Regards, Brain Damaged Dodo |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|