Skip to content

Instantly share code, notes, and snippets.

@vitalymak
Last active May 19, 2017 14:49
Show Gist options
  • Save vitalymak/76d79266908d25467d3468e8a964cc8c to your computer and use it in GitHub Desktop.
Save vitalymak/76d79266908d25467d3468e8a964cc8c to your computer and use it in GitHub Desktop.
Bash: search files by extension, without extension etc.
find . -name *.jpg # find all *.jpg files
find . -type f -name '*.*' | sed 's|.*\.||' | sort -u # find all unique file extensions
find . -type f ! -name "*.*" # find all files without extensions
find . -type f ! -name "*.*" | sed 's!.*/!!' | sort -u # find all unique file names without extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment