From the course: CompTIA Linux+ (XK0-005) Cert Prep

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Find files with Find

Find files with Find

- [Instructor] One of the most powerful ways of finding files on Linux is using the find command. The find command is not database-driven and thus the results are always up to date. Find requires a search path. If you don't provide one, then it assumes you want to look in the current directory. To search the entire file system just use slash as the path, but keep in mind that you will need to elevate privileges. You will also need to provide the name of the file you're looking for. Type into a terminal sudo find / -name bash and hit Enter. This will search the entire file system for a file named bash. In contrast to the locate command, find only searches for the exact characters you've entered. To get find to be less specific you will have to use patterns. For instance, bring your line back and surround bash with asterisks. This looks for file names that include bash and, as such, returns bash-completion and .bashrc…

Contents