From: Chris Koeritz Date: Tue, 29 Jan 2019 05:41:06 +0000 (-0500) Subject: new script to find read only files X-Git-Tag: 2.140.115^2~49 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=4015bdf74ecf40c2169e7ad439fe316d1643dea9;p=feisty_meow.git new script to find read only files very efficient. --- diff --git a/scripts/files/find_readonly.sh b/scripts/files/find_readonly.sh new file mode 100644 index 00000000..833dd171 --- /dev/null +++ b/scripts/files/find_readonly.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# locates read only files in the directories specified. +# this is a much simpler and more efficient command than some i've seen +# floating about; it gets the find command to do all the heavy lifting +# and doesn't try to build impossibly large command lines. + +find "${@}" -follow -type f -perm -u+r -a ! -perm -u+w +