Custom output on FIND

I have a file, ENV.doc somewhere in my home directory. I want to know where the file is located in my sub directories using FIND. But, I want to display only the relative path along with the file name.

Thanks,

If you use find with a relative path (i.e. . (a dot) or directory name) then it will only display the relative path of the file.

$ find tmp -name file_1
tmp/file_1

Thank You. It's working!

---------- Post updated at 02:13 PM ---------- Previous update was at 01:48 PM ----------

When I try the command
$find /home/Ashok -name ENV.doc
I am able to get the straight forward result. But, when I tried the same, finding the file starting from the root directory as
find / -name ENV.doc
I am getting several messages like

...........
...........
find: /home/portal: Permission denied
find: /home/itmuser: Permission denied
/home/Ashok/All About Linux and Unix/ENV.doc
find: /home/mou: Permission denied
find: /home/netcool: Permission denied
...........
...........

I know I am getting this becase I am a non root user. But I want to supress all those Permission Denied messages and want to get the straight forward message as above listed.

Thank you,

Redirect the error messages away:

find / -name ENV.doc 2>/dev/null

Here are we overwriting the contents of /dev/null by the error reports?

Maybe you can read this:

/dev/null - Wikipedia, the free encyclopedia

I am getting what I want now. Thanks for all your replies.