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   -   Original Discussion by pdtak
pdtak's Unix or Linux Image
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   -   Original Discussion by pdtak
jim mcnamara's Unix or Linux Image
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 January 2018, 9:34 AM EST
Location: NM
Posts: 11,284
Thanks: 581
Thanked 1,127 Times in 1,038 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   -   Original Discussion by pdtak
shamrock's Unix or Linux Image
shamrock shamrock is offline Forum Advisor  
Registered User
 
Join Date: Oct 2007
Last Activity: 22 December 2017, 1:24 PM EST
Location: USA
Posts: 1,599
Thanks: 37
Thanked 158 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 05:57 PM
Sticky Bit udtyuvaraj AIX 1 07-16-2010 02:24 PM
sticky bit manu.vmr Shell Programming and Scripting 2 02-02-2007 07:43 AM
Sticky Bit rob11g UNIX for Dummies Questions & Answers 1 03-14-2005 04:51 PM
sticky bit mma_buc_98 UNIX for Dummies Questions & Answers 2 08-22-2002 12:20 PM



All times are GMT -4. The time now is 02:20 AM.