From 9ec7173ae1ad1f26e96846669a98a1bf4db8f287 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Thu, 22 Jul 2021 09:44:39 -0400 Subject: [PATCH] removing snapshots from counts. --- scripts/files/fast_counter.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.34.1