Operating System - HP-UX
1827247 Members
2356 Online
109716 Solutions
New Discussion

find script to find sticky bit applied

 
Ratzie
Super Advisor

find script to find sticky bit applied

How can I find in a directory if there is a sticky bit that has be applied? I have 500 files to look at.
2 REPLIES 2
G. Vrijhoeven
Honored Contributor

Re: find script to find sticky bit applied

Hi,

I would go for:
suid:
find / -perm u+s
sgid:
find / -perm g+s


Gideon

PS a stickybit on a dir is not a security issue on a file it can be.
A. Clay Stephenson
Acclaimed Contributor

Re: find script to find sticky bit applied

The 'sticky' bit is octal 1000 so,
cd /somedir
find . -perm -1000

You might want to restrict this to regular files, so:
find . -type f -perm -1000

If it ain't broke, I can fix that.