Find files from the command line
One can very rapidly find files with arbitrary criteria on systems with findutils. Linux and BSD normally come with findutils already installed. Windows users can do this via Windows Subsystem for Linux or Microsoft coreutils. macOS users can install findutils via Homebrew that makes the command “gfind” in place of “find”.
A wide range of criteria can be used to rapidly find files.
If working on a remote filesystem mounted over SSHFS we suggest SSHing into that system and running the find command that will be orders of magnitude faster.
Appending 2>/dev/null to the end of a command removes nuisance messages about file permissions.
If piping the find command, put 2>/dev/null before the pipe.
Find files with “report” in the filename, case-insensitive:
find -iname "*report*"Suppose data/ is a symbolic link to another directory, either on your computer, a USB hard drive or a server.
By default, find will not search symbolic linked resources, which can be searched with
option -L:
find -L data/ -iname "*report*"