How to find file or folder location in Linux/Unix usnig bash command line

Use this grep commend

locate apache | egrep "\/apache$"

Example:

[myserver]$: locate apache | egrep "\/apache$"
[myserver]$: /usr/local/dh/apache