From 4015bdf74ecf40c2169e7ad439fe316d1643dea9 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Tue, 29 Jan 2019 00:41:06 -0500 Subject: [PATCH] new script to find read only files very efficient. --- scripts/files/find_readonly.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/files/find_readonly.sh 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 + -- 2.34.1