Find files from the command line
One can very rapidly find files with arbitrary criteria on systems with GNU Findutils. This includes Linux, MacOS and Windows Subsystem for Linux.
Just about any criteria one could think of 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–it will be orders of magnitude faster.
Most examples use home directory
~ as a starting point just for convenience.
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*"
~/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 this resource unless you
“resolve” the symbolic link
to a directory by putting a final
find ~/data/ -iname "*report*"
symbolic link section for more details, in particular the