I work as a Linux Systems Admin, so i use both very often.
When i know the filname or some part of it, and need to know where on the FileSystem something is, I use locate.
Its very fast, low resources is important on those over-shared systems.
When i need to get a list of files to do commands on, often when the parameter is not filname related, i use find.
I use this very often to change permissions.
Code:
#for just the directories from ./,#
$ find ./ -type d | xargs -I '{}' chmod 755 '{}'
#or for just the files from ./,#
$ find ./ -type f | xargs -I '{}' chmod 644 '{}'
if i want execute on something with a file extension (such as txt), i would not use find -name unless nessesary for multi-level directories.
Code:
#I prefer the much faster,#
$ ls *.txt | xargs #COMMAND#
#or if ls somehow unavailable (it has happened, crazy i know)#
$ echo *.txt | xargs #COMMAND#
so they actually serve very diffrent purposes for me.
i end up using locate much more often, a quick
Code:
#or if i need to remove unrelated listings
$ locate #FILENAME# | grep -v #FILTEROUT# | less
Hope this helps,