课程: Linux: System Information and Directory Structure Tools
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Finding files using find - Linux教程
课程: Linux: System Information and Directory Structure Tools
Finding files using 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'll 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…