From the course: Learning Linux Command Line

Unlock this course with a free trial

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

Find files from the command line

Find files from the command line - Linux Tutorial

From the course: Learning Linux Command Line

Find files from the command line

- [Instructor] We've been working with our exercise files, a limited set of files we can explore pretty easily, but sometimes we'll need to ask the system to look for a file if we don't know where it is. To do that, we can use the find command. Find has a lot of options which are worth exploring as we build our command line skills. For now, we'll take a look at some basic usage. To use find, I'll type find and then provide the location or the scope of where I want to search. I'll use the dot or period character for the current working directory, which is my exercise files, and then I'll type -name, which is the test that I'm using to match files. I want to match files based on their name. There are other options like size, date, and so forth, but I find that I use name the most. Then I'll put a matching pattern for what I'm looking for. I'll put "poe*" in double quotes. The star or asterisk wild card will match any number of characters. This should find our poems.txt file. And when I…

Contents