to find a file

Hello guys,
I amtrying to find files that end with .msh in the directory and sub directory of home folder. I used find command but it gives me error.

$ find -/home '*.msh'

find: invalid predicate `-/home'
plz help

Hi,
Becuase of incorrect syntax:

find /home "*.msh"

Guru.

Hi.

I think maybe you've used a hyphen (-) where you meant to use a tilde (~):

(assuming it's your home directory)

$ find ~ '*.msh'

(assuming it's anyone else's, and you have permissions to read them, use guruprasadpr's suggestion)

or
find /home -name '*.msh' -print 2>/dev/null

It will find all of the files with that extension that you have access to, and pipe the errors to the bit-bucket.

This will give you the results you want...

find /home -print | grep \.msh$
The backslash "escapes" the dot so that it is used literally,
and the $ character specifies the end of the string

Jim MacKelvey