summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar https://www.google.com/accounts/o8/id?id=AItOawln3ckqKx0x_xDZMYwa9Q1bn4I06oWjkog <Michael@web>2013-07-12 19:28:09 +0000
committerGravatar admin <admin@branchable.com>2013-07-12 19:28:09 +0000
commit0820caf2cc7ce10bcdbcb2f6571b3fbf3aac6089 (patch)
tree14adbf3bf34cd2563d67de4d61aeaa0466b242f0
parente201cc2420f2e124a982fc5574b664e11adc355e (diff)
-rw-r--r--doc/tips/yet_another_simple_disk_usage_like_utility.mdwn9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/tips/yet_another_simple_disk_usage_like_utility.mdwn b/doc/tips/yet_another_simple_disk_usage_like_utility.mdwn
new file mode 100644
index 000000000..961776e19
--- /dev/null
+++ b/doc/tips/yet_another_simple_disk_usage_like_utility.mdwn
@@ -0,0 +1,9 @@
+Here's the annex-du script that I use:
+
+#!/bin/sh
+git annex find "$@" --include '*' --format='${bytesize}\n' |awk '{ sum += $1; nfiles++; } END { printf "%d files, %.3f MB\n", nfiles, sum/1000000 } '
+
+This one can be slow on a large number of files, but it has an advantage of being able to use all of the filtering available in git annex find.
+For example, to figure out how much is stored in remote X, do
+
+annex-du --in=X