diff options
Diffstat (limited to 'bin/duplicate_size.sh')
| -rwxr-xr-x | bin/duplicate_size.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/duplicate_size.sh b/bin/duplicate_size.sh new file mode 100755 index 0000000..7ca2bf1 --- /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 \$(duplicate_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 }'" |
