Re: [SLUG] find command - script help

From: Jim Forte (james@magna.net)
Date: Mon Aug 24 2009 - 21:16:23 EDT


I am pretty sure this works. Could not test to see if it was

find /tmp -gid 0 -xtype d -perm /u+w,g+w,o+w,o-t -printf "%F:%f"

If you meant to include the symlink entry but not its contents then
change xtype to type.

find /tmp -gid 0 -type d -perm /u+w,g+w,o+w,o-t

This does not take into accont the NFS file system so the try this.

  find / -gid 0 -xtype d -perm /u+w,g+w,o+w,o-t -printf "%F:%h/%f\n" |
egrep -v '^nfs:' | awk -F: '{print $2}'

---------------------------------------------------------------
Yours Truly
James Forte, Magna Timeshare Software

http://www.magna.net/ mailto:James@Magna.Net
1465 South Fort Harrison Ave#207, Clearwater FL 33756
East Coast 407-352-2402
West Coast 415-367-7496
UK +44 80 8178 8506
TrustFax:866-752-3073

THIS COMMUNICATION IS ONLY INTENDED FOR THE RECIPIENT(S) ABOVE.
PLEASE DISCARD IF YOU HAVE RECEIVED THIS IN ERROR.
-----------------------------------------------------------------

On Mon, 24 Aug 2009, Richard Tricoche wrote:

> Hello all,
> I'm looking for a bit of help with a find command and would appreciate any help in advance.
>
> I need to find directories with the following 6 criteria:
>
> 1. directory
> 2. root owned
> 3. no sticky bit set
> 4. writable by everyone
> 5. not an NFS mount
> 6. don't follow symbolic links
>
> It's possible I may need to create a bash shell script for this, which I'd be happy to do.
> This will run only on LINUX servers.
>
> Again, any help is appreciated in advance.
>
>
>
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 13:24:27 EDT