summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorHorus32014-05-04 23:36:14 +0200
committerHorus32014-05-04 23:36:14 +0200
commit5cc26b20de7b64faf010f389f297777a365f557b (patch)
treea7356865e06057f78bd47f3df4ad779528c89614 /bin
parentf060617d9a33f5a75259edda6c22574a8d8d9df9 (diff)
downloaddotfiles-5cc26b20de7b64faf010f389f297777a365f557b.tar.gz
Used to find the filesize of all duplicates found with duplicate.sh.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/duplicate.sh (renamed from bin/data_double.sh)0
-rwxr-xr-xbin/duplicate_size.sh13
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 }'"