From 880b1806adc6daad3115ec0f1248843d674acda2 Mon Sep 17 00:00:00 2001 From: Jonathan Blake Date: Fri, 26 Oct 2012 23:12:59 +0000 Subject: [PATCH] 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 --- common/scripts/list-file-sizes.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 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 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}' -- 2.34.1