Linux / Unix Find Command Avoid Permission Denied Messages
When I type find . -type d -name "foo" command I get Permission denied error messages. How do I exclude all “permission denied: messages from the find command under Linux or Unix like operating systems?
The find command is used to locate files on a Linux or Unix like operating system. The find command will search directory to match the supplied search criteria. You can search for files by type, name, owner, group, date, permissions and more. By default the find will search all subdirectories for you.
Find command basic syntax
The syntax is: find where-to-look criteria action find /dir/to/search -name filetosearch find /dir/to/search -name "*.c" find /home/nixcraft/project/ -name "*.py" -print In this example, find will search the /tmp directory for any files named “data*.txt” and display their pathnames:
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.