From: Jonathan Blake Date: Fri, 26 Oct 2012 23:12:59 +0000 (+0000) Subject: simple script to list the file sizes for books for the website X-Git-Tag: 20130222~61 X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=commitdiff_plain;h=880b1806adc6daad3115ec0f1248843d674acda2 simple script to list the file sizes for books for the website git-svn-id: https://projectaon.org/data/trunk@2147 f6f3e2d7-ff33-0410-aaf5-b4bee2cdac11 --- diff --git a/common/scripts/list-file-sizes.sh b/common/scripts/list-file-sizes.sh new file mode 100755 index 0000000..3e58a00 --- /dev/null +++ b/common/scripts/list-file-sizes.sh @@ -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}'