summaryrefslogtreecommitdiff
path: root/bin/duplicate_size.sh
blob: 7ca2bf1586965d005a04fd1974dcdcfa00c2cd14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 }'"