Find command with Ignore Access issues

Hi,

I am using following command to find a specific file.

find . -name "find*.txt" -type f -print

I am issuing that command at root directory since I don't know in which sub folder that file is getting created from some other process.

As I am not having access to all directories, my command dumping lot of error messages on console like " Can't access this directory.....!" etc. It is becoming very difficult to find the message where the file actually present from my command.

Is there any way that we can exclude/ignore access issues from find command result? Thank you..

find . -name "find*.txt" -type f -print 2>/dev/null
1 Like

Thank you....That perfectly worked...

Above solution is perfect.

Note that, if you have gnu find can also use ,

man find 

Seems there is no -s option in find command similar to grep command :confused: