Skip to content

Instantly share code, notes, and snippets.

@scintill
Created June 23, 2012 22:12
Show Gist options
  • Save scintill/2980281 to your computer and use it in GitHub Desktop.
Save scintill/2980281 to your computer and use it in GitHub Desktop.
get count of unique files in directory
#!/bin/bash
# the number of files, including any duplicates, is: ls -l | wc -l
sha256sum * | cut -d ' ' -f 1 | sort -u | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment