Linux file deduplication

background:

A lot of pictures, but the pictures just not the same name, the same content, we need to re

date;find /home/admin/image -name *.jpeg | xargs md5sum|sort >allfiles;cat allfiles |uniq -w 32 > uniqfiles;comm allfiles uniqfiles -2 |cut -c 35-|tr '\n' '\0'|xargs -n `getconf ARG_MAX`  rm;date

Guess you like

Origin www.cnblogs.com/bowanghou/p/11286799.html