]> git.rmz.io Git - dotfiles.git/commitdiff
bin: Add find_duplicate
authorSamir Benmendil <me@rmz.io>
Sun, 22 May 2016 20:46:01 +0000 (21:46 +0100)
committerSamir Benmendil <me@rmz.io>
Sun, 22 May 2016 20:46:01 +0000 (21:46 +0100)
bin/find_duplicate [new file with mode: 0755]

diff --git a/bin/find_duplicate b/bin/find_duplicate
new file mode 100755 (executable)
index 0000000..b7ce1ba
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+dirs=(/home/ramsi/Movies /mnt/Skaro/Movies)
+
+find "${dirs[@]}" -type f -printf '%H %P\n' | sed -r 's/\{[^}]+\}.*//' | sort -k1 | uniq -Df1