When doing a find command, like the following, if you do not have sufficient permissions, you will get a lot of “permission denied” messages. This sometimes drowns out the few lines where you actually get a hit. One way to avoid that is to add the following to the command:
find / -name filename.txt 2>/dev/null
The 2 in the above command is the error output which is redirected to /dev/null, effectively suppressing your error messages. This way you will only see the successful paths where the file does exist and you have permissions.
Leave a comment