Finding our files is getting more difficult as data gets larger. Locate is a database-driven search tool that's fast and easy to use. The database is updated once per day.
- [Narrator] 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 update DB command.…Being database-driven, it's very fast…but only contains files…that are listed in the locate database.…By default, in CentOS, the locate database…is updated once per day, by a system service.…Let's type in locate bzip2…and hit enter.…Locate bzip2 will search the locate database,…and find files that include the name bzip2.…
We can count the number of files…by adding the dash C option.…Locate dash C bzip2, and hit enter.…You can see that we get 14 results.…If you want to search for more than one item,…just add it to the line.…Locate bzip2 space M-A-N,…and hit enter.…Obviously, we have a lot more results.…Let's count it by doing a locate…dash C space bzip2 space man.…You can see that we have 11,440 results.…Just adding the search criteria says to…search for any file that has the word bzip2 or man.…
- Learning Linux command syntax
- Getting help on the CLI and GUI
- Finding help online
- Using basic commands
- Navigating file systems
- Editing text
Skill Level Intermediate
Linux: Bash Shell and Scriptswith Kevin Dankwardt2h 46m Intermediate
Setting up a Red Hat Enterprise Linux Serverwith Sandra Toner2h 46m Intermediate
1. Getting Help
2. Using Basic Commands
3. Navigating File Systems
4. Editing Text
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.