simple script to list the file sizes for books for the website
authorJonathan Blake <jonathan.blake@projectaon.org>
Fri, 26 Oct 2012 23:12:59 +0000 (23:12 +0000)
committerJonathan Blake <jonathan.blake@projectaon.org>
Fri, 26 Oct 2012 23:12:59 +0000 (23:12 +0000)
git-svn-id: https://projectaon.org/data/trunk@2147 f6f3e2d7-ff33-0410-aaf5-b4bee2cdac11

common/scripts/list-file-sizes.sh [new file with mode: 0755]

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}'