X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Ffiles%2Ffast_counter.sh;h=c85723e9cde64ec394e0f15b3b8d9ff756b81aa3;hb=68f16b40d564a399b525b24ee045f640482c7f96;hp=e359514e6298495a6819303601274d60354143ef;hpb=3d87e1de185daea3f52f671b963aaea0a669d10b;p=feisty_meow.git diff --git a/scripts/files/fast_counter.sh b/scripts/files/fast_counter.sh index e359514e..c85723e9 100644 --- a/scripts/files/fast_counter.sh +++ b/scripts/files/fast_counter.sh @@ -1,14 +1,16 @@ for dir in "${@}"; do - /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v ".*:$" | wc -l + echo -n "files in '$dir':" + /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