find

Find only files
find /dir -type f
Find only directories
find /dir -type d
Match expression
find /dir -name '*test*'
Find files matching an extension
find /dir -name '*php'
Find files not matching a rule
find /dir -! -name '*txt'
Find files less than a day old
find /dir -mtime -1
sort the results even with print0
find /var/nas/sites -type d -maxdepth 1 -print0 | sort -z | xargs -0 -I {} echo {}
find directories but ignore dot directories
find /var/nas/sites -mindepth 1 -maxdepth 1 -! -name '.*' -print
find files and run 'ls' on them
find . -type f -ls
find empty files
find . -type f -empty