deawrias

list all duplicate directories

Jan 7th, 2016
2,205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.16 KB | None | 0 0
  1. find . -type d|while read i; do echo $(ls -1 "$i"|wc -m) $(du -s "$i"); done|sort -sn -k1,2^Cwk -F' ' '{n=$1"."$2;if(n==o){if(l){print l;l="";}print;}else{o=n;l=$0;}}'
Advertisement
Add Comment
Please, Sign In to add comment