Created
October 18, 2013 17:37
-
-
Save todd-dsm/7045085 to your computer and use it in GitHub Desktop.
find all files AND directories, then write to a file per this criteria: a) With World Writable permission bit set: -perm -0002 b) that are NOT of filesystem type proc: -not -fstype proc nfs c) that are NOT in these directories: '/var/tmp' '/var/tmp/*' '/tmp' '/tmp/*' '/proc' '/proc/*' '/dev' '/dev/*'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find "$sysRoot" -noleaf \( -type d -o -type f \) -perm -0002 \ | |
-not -fstype proc \ | |
-not -wholename '/var/tmp' -not -wholename '/var/tmp/*' \ | |
-not -wholename '/proc' -not -wholename '/proc/*' \ | |
-not -wholename '/tmp' -not -wholename '/tmp/*' \ | |
-not -wholename '/dev' -not -wholename '/dev/*' \ | |
# Write all findings to a log; 1-per-line | |
>> "$tmpDataFile" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment