Anthony Damiro:
Can someone better explain this to me. In this screen shot it the command ‘$ find -perm -100’ per the instructor implies that its searching for files with at least execute permission. An execute permission from my understanding is something like this ‘rwx’ which is equal to 421. So im confused with the 100 number. Where did that come from?
Al West:
-perm -100
has a leading hyphen (-
) which means “at least these permissions”. It doesn’t test every bit in the permission set, just the specific bits provided. In this case, the 100 is specifying execute permission for the owner:
• 100 corresponds to --x------
.
So, $ find -perm -100
is searching for files where the owner has at least execute permission. This would match files with permissions like:
• --x------
(100)
• --x--x--x
(111)
• r-x------
(500)
You mention rwx
is 421 - it is the addition of these bits, 7.