From: Chris Koeritz Date: Thu, 22 Jul 2021 13:44:39 +0000 (-0400) Subject: removing snapshots from counts. X-Git-Tag: 2.140.128~1^2~18 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=68f16b40d564a399b525b24ee045f640482c7f96;p=feisty_meow.git removing snapshots from counts. --- diff --git a/scripts/files/fast_counter.sh b/scripts/files/fast_counter.sh index 6ab48990..c85723e9 100644 --- a/scripts/files/fast_counter.sh +++ b/scripts/files/fast_counter.sh @@ -2,14 +2,15 @@ for dir in "${@}"; do echo -n "files in '$dir':" - /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v ".*:$" | wc -l + /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v ".*:$" | grep -v "\.snapshot" | wc -l # patterns that remove files from being counted, above: # - # ^$ -- all blank lines - # ^\.$ -- all lines with just a dot (current directory) - # ^\.\.$ -- all lines with just two dots (parent directory) - # .*:$ -- all lines that end with a colon (directory heading from recursive ls) + # ^$ -- all blank lines + # ^\.$ -- all lines with just a dot (current directory) + # ^\.\.$ -- all lines with just two dots (parent directory) + # .*:$ -- all lines that end with a colon (directory heading from recursive ls) + # \.snapshot -- all lines mentioning the snapshot directory. done