simple script to list the file sizes for books for the website
[project-aon.git] / common / scripts / list-file-sizes.sh
diff --git a/common/scripts/list-file-sizes.sh b/common/scripts/list-file-sizes.sh
new file mode 100755 (executable)
index 0000000..3e58a00
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+# List the file sizes of a book, should be executed in a parent directory of
+#   all the files to be found
+# Usage: list-file-sizes.sh bookcode
+
+find . -name "$1.*" \
+    | grep -v "\.svn\|\.xml" \
+    | xargs ls -lh \
+    | awk '{print $5 "\t" $9}'