summaryrefslogtreecommitdiff
path: root/filecount
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-03-09 10:46:46 +0000
committerLars Wirzenius <liw@liw.fi>2014-03-09 10:46:46 +0000
commit4a458404fa00bf42bc1b92e11831a6c19e70142d (patch)
treec1343b2b3cd977e412ae0d08e1d63ebe4383af5c /filecount
parent16001877d5d9d2454a5317c345dba7f5272bfdd1 (diff)
downloadextrautils-4a458404fa00bf42bc1b92e11831a6c19e70142d.tar.gz
Add filecount
Diffstat (limited to 'filecount')
-rwxr-xr-xfilecount9
1 files changed, 9 insertions, 0 deletions
diff --git a/filecount b/filecount
new file mode 100755
index 0000000..e58f95d
--- /dev/null
+++ b/filecount
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -eu
+
+for dir in "$@"
+do
+ n=$(find "$dir" -printf x | wc -c)
+ printf '%8d %s\n' "$n" "$dir"
+done