From 5cc26b20de7b64faf010f389f297777a365f557b Mon Sep 17 00:00:00 2001 From: Horus3 Date: Sun, 4 May 2014 23:36:14 +0200 Subject: Used to find the filesize of all duplicates found with duplicate.sh. --- bin/duplicate_size.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/duplicate_size.sh (limited to 'bin/duplicate_size.sh') diff --git a/bin/duplicate_size.sh b/bin/duplicate_size.sh new file mode 100755 index 0000000..d211558 --- /dev/null +++ b/bin/duplicate_size.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +function usage() { + echo "Used to find the filesize of all duplicates found with duplicate.sh." + echo "Usage: eval \$(double_size.sh)" + exit 1 +} + +if [ $# -gt 0 ]; then + usage +fi + +echo "FILE=\$(for i in **/found_doubles/*; do du -sb \"\$i\"; done); echo \$FILE | awk '{ sum+=\$1} END { print sum }'" -- cgit v1.2.3