Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How to find sticky bit dir/files

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-03-2008
pdtak pdtak is offline
Registered User
 
Join Date: Feb 2008
Last Activity: 29 June 2015, 5:50 PM EDT
Location: Sacramento
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
How to find sticky bit dir/files

I need to find all sticky bit dir/files on my system and clean them up if necessary.
How to I write a script to do this?
Thanks.
Sponsored Links
    #2  
Old Unix and Linux 04-03-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 25 July 2017, 10:18 AM EDT
Location: NM
Posts: 11,121
Thanks: 549
Thanked 1,076 Times in 998 Posts

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

Will list the directories with sticky bit set.
Sponsored Links
    #3  
Old Unix and Linux 04-03-2008
shamrock shamrock is offline Forum Advisor  
Registered User
 
Join Date: Oct 2007
Last Activity: 10 July 2017, 10:43 AM EDT
Location: USA
Posts: 1,599
Thanks: 36
Thanked 157 Times in 148 Posts

Code:
find . -perm -1000

Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sticky bit on files? newlinuxuser1 UNIX for Dummies Questions & Answers 6 03-31-2011 04:57 PM
Sticky Bit udtyuvaraj AIX 1 07-16-2010 01:24 PM
sticky bit manu.vmr Shell Programming and Scripting 2 02-02-2007 06:43 AM
Sticky Bit rob11g UNIX for Dummies Questions & Answers 1 03-14-2005 03:51 PM
sticky bit mma_buc_98 UNIX for Dummies Questions & Answers 2 08-22-2002 11:20 AM



All times are GMT -4. The time now is 08:46 PM.