From the course: Unix Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Searching for files and directories

Searching for files and directories - Unix Tutorial

From the course: Unix Essential Training

Start my 1-month free trial

Searching for files and directories

- [Instructor] Let's talk about how you can search for files and directories that you created on Unix. The way that we search for files and directories is with the find command. The format is the find command, followed by the path that we want to search. So, we're going to search all files and directories inside that path. And then last the expression that we want to use for searching. And there's a variety of expressions we can use. We're going to just be using the most common and most basic one which is the name expression. So here I have the find command, I'm telling it to search in the root of the hard drive. That's what that forward slash is, in the directory home, and in there, look for things where the name is equal to vacation_photo.jpg. And it'll look throughout that directory to see if it can find a file that has that matching name. The double quotes are optional, but I think they're a good idea. This type…

Contents