pokhiii / utilities

Utility commands you'd wish you had find earlier!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

utilities

  1. List all unique extensions for files contained in a directory

    find . -type f | sed -En 's|.*/[^/]+\.([^/.]+)$|\1|p' | sort -u
    

    (Source: https://superuser.com/a/232101)

  2. Recursively delete all files of a certain extension from a directory

    find UPMOST_RELEVANT_PATH -name ".ext" -delete
    

    (Source: https://superuser.com/a/89415)

About

Utility commands you'd wish you had find earlier!