Arvil Meña
Home / Snippets / Unix – list all extensions under current directory + list all files that have specific extension

Unix – list all extensions under current directory + list all files that have specific extension

by Arvil
published => May 8th 2020
# list all files by extension:
find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u

# get path of all files by extension
find . -iname '*.php'

Related Links

  • https://stackoverflow.com/a/1842270/3531439
  • https://unix.stackexchange.com/a/273209/79493

Share

Related Posts

Comments