summaryrefslogtreecommitdiff
path: root/bin/duplicate_size.sh
blob: d2115588a9c429257c523db35db43feb18a79166 (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 \$(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 }'"