From the course: CompTIA Linux+ (XK0-005) Cert Prep
Unlock the full course today
Join today to access over 24,300 courses taught by industry experts.
Find files using Locate - Linux Tutorial
From the course: CompTIA Linux+ (XK0-005) Cert Prep
Find files using Locate
- [Speaker 1] The Linux directory structure is deep and has many files. Knowing how to find files is important. Let's start finding files by using the locate command. The locate command uses a database created by the updatedb command. Being database-driven it is very fast but only finds files that are listed in the database. By default in most Linux systems the locate database is updated once per day by a system service. Let's search for the file named bzip2 using the locate command. In a terminal type in locate bzip2 and hit enter. This will search the database and find files that include the name bzip2. Locate, by default, uses a fairly loose search. We can count the number of files by adding the -c option. Bring your line back and insert -c between locate and bzip2 and hit enter. You can see that I got 15 results. If you want to search for more than one item just add it to the line. Type in locate bzip2 man and hit…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
About Linux Shells6m 21s
-
(Locked)
About Linux Terminals1m 50s
-
(Locked)
Get help on the command line5m 8s
-
(Locked)
Understand the Linux Filesystem Hierarchy8m 22s
-
(Locked)
Understand filesystem paths6m 2s
-
(Locked)
Create files and dirs4m 11s
-
(Locked)
Get information about files5m 29s
-
(Locked)
Copy files and dirs4m 39s
-
(Locked)
Move and rename files and dirs4m 11s
-
(Locked)
Remove files and dirs3m 44s
-
(Locked)
Create links to files and dirs6m 24s
-
(Locked)
Use input-output redirection (>, >>, |, 2>)1m 55s
-
(Locked)
Connect programs with named and unnamed pipes4m 19s
-
(Locked)
File redirects and tees6m 7s
-
(Locked)
Find files using Locate4m 11s
-
(Locked)
Find files with Find7m 28s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-