My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
592 B

  1. #!/usr/bin/env sh
  2. # Description: List non-empty duplicate files in the current directory (based on size followed by MD5)
  3. #
  4. # Source: https://www.commandlinefu.com/commands/view/3555/find-duplicate-files-based-on-size-first-then-md5-hash
  5. #
  6. # Dependencies: find md5sum sort uniq xargs
  7. #
  8. # Shell: POSIX compliant
  9. # Authors: syssyphus, KlzXS
  10. find . -size +0 -type f -printf "%s %p\n" | sort -rn | sed -n 'N; /^\([0-9]*\) .*\n\1.*$/p;$d;D' | awk '{printf("%s\0", substr($0, index($0, $2)))}' | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate
  11. printf "Press any key to exit"
  12. read -r _