diff options
| author | Horus3 | 2014-05-04 23:36:14 +0200 |
|---|---|---|
| committer | Horus3 | 2014-05-04 23:36:14 +0200 |
| commit | 5cc26b20de7b64faf010f389f297777a365f557b (patch) | |
| tree | a7356865e06057f78bd47f3df4ad779528c89614 | |
| parent | f060617d9a33f5a75259edda6c22574a8d8d9df9 (diff) | |
| download | dotfiles-5cc26b20de7b64faf010f389f297777a365f557b.tar.gz | |
Used to find the filesize of all duplicates found with duplicate.sh.
| -rwxr-xr-x | bin/duplicate.sh (renamed from bin/data_double.sh) | 0 | ||||
| -rwxr-xr-x | bin/duplicate_size.sh | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/bin/data_double.sh b/bin/duplicate.sh index 655aff2..655aff2 100755 --- a/bin/data_double.sh +++ b/bin/duplicate.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 }'" |
