find command

To recursively search filenames AND file content for a string from a specific folder on down:

find /path/to/folder/ -exec grep 'searchTerm' '{}' /dev/null \; -print
or
find /path/to/folder/ -exec grep -H 'searchTerm' '{}' \; -print

Same as above but for a specific filetype:

find /path/to/folder/ -name '*fileType' -type f -exec grep 'searchTerm' '{}' /dev/null \; -print
or
find /path/to/folder/ -name '*fileType' -type f -exec grep -H 'searchTerm' '{}' \; -print

To recursively search filenames ONLY for a string from a specific folder on down:

find . -print |grep -i searchTerm

Same as above but for a specific filetype:

sudo find . -print | grep -i '.*[.]fileType'

To list most recently modified mp3s, including sub-folders:

find $1 -type f -name '*mp3' -exec stat --format '%Y :%y %n' {} \; | sort -n | cut -d: -f4- | cut -d " " -f3-

To list all symbolic links in a directory:

find . -type l -ls

To find all files owned by a user:

find . -user username -ls

To generate a playlist and listen to it from the command line in shuffle mode:

find -type f -iname \*.mp3 > playlist.txt
mplayer -shuffle -playlist playlist.txt

Null

NULL