Operating System - HP-UX
1833934 Members
1820 Online
110063 Solutions
New Discussion

Re: How to find directories havin the sticky bit on

 
LAFDAL_1
Advisor

How to find directories havin the sticky bit on

Can you tell me how to use the find command to searc for all the directories whixh have the sticky bit activated.
Thanks a lot
Zidane LAFDAL
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: How to find directories havin the sticky bit on

cd to desired starting directory
find . -type d -perm -1000
If it ain't broke, I can fix that.
Robert-Jan Goossens
Honored Contributor

Re: How to find directories havin the sticky bit on

Hi,

# find / -type d -perm 1777 -exec ll {} \;

# find / -type d -perm 1776 -exec ll {} \;

Regards,
Robert-Jan
Fred Ruffet
Honored Contributor

Re: How to find directories havin the sticky bit on

find / -type d -perm -1000 -exec ls -ld {} \;

-type d : returns directories
-perm -1000 : returns only directories with at least the sticky bit
use d option of ls to return description of dir and not content.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Sanjay_6
Honored Contributor

Re: How to find directories havin the sticky bit on

Hi,

Try,

From the directory you want to find all sub-directoies with sticky bit,

# find . -type d -perm -u=t -print

Hope this helps.

Regds
LAFDAL_1
Advisor

Re: How to find directories havin the sticky bit on

Thanks a lot. It is fine
Zidane LAFDAL