Locate files on linux, FreeBSD and UNIX system

Q. How do I locate files on Debian Linux?

ADVERTISEMENTS

A. You can use find and locate command.

find command search a file system in real time. So depending on the size of your file system (partition) and the depth of your search, the find command can sometime take a long time to scan all of the data.
To search your entire filesystem for the files called resume.doc type
$ find / -name resume.doc

locate command list or display files in databases that match a given filenames. This is not a real time reporting. The data reported in the output of locate isn’t as fresh as the data reported by find. However it is the fastest way to find a file.
$ locate resume.doc

More Find command examples

Please see following previous examples for more information:

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
1 comment… add one
  • Linda Black Nov 28, 2012 @ 17:03

    How do I find a missing file names +8extpfx.ciii?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.