Find files in Linux, Mac, Windows and BSD

less than 1 minute read

Suppress the

Permission denied

errors when searching your whole hard drive with find by appending 2>/dev/null at the end of the find command.

If piping the find command, put 2>/dev/null before the pipe.

On Windows, this is accomplished via Cygwin or Windows Subsystem for Linux

Example

Find all files that contain “report” in the filename, case-insensitive

find ~ -iname "*report*" 2>/dev/null

Leave a Comment