Pete's Linux Advent Calendar 2008
The 9th day
Finding files of a certain type
Under Linux the extension does not always indicate the filetype. Executables
for example can be a binary or script, written in different languages.
Say you want to find python scripts:
find . -type f -print0 | xargs -0 file | grep ".*:.*python" | cut -d: -f1