How to Find a file by name in UNIX/Solaris/Linux?

To find a file in UNIX, Solaris, or Linux, you can use the ‘Find‘ command.

Exampel: find / -name apache.* -print

This will search the whole system for any filename with apache and print the output to the screen.

Other arguments for the Find command:

-user username <– this will search files owned by an user
-group groupname <– this will search files owned by a group
-name filename <– this will search files with matching filename
-print <– this will list out the output
-exec command {} \;<– this will use the located files as arguments to a command.
-type x <– this will search by file type [ f (ordinary file), d (directory), b (block special file), c (character special file), D (door), l (symbolic link), p (named pipe), or s (socket) ]