An ad-free and cookie-free website.
Learn to find files within directories at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux find Command Summary with Examples (3:22)
Our thirtieth word, or command to memorize is
find from our category
find allows you to search for files
||Print help screen|
||Find files with a specific name or expression|
Recall from the previous video, we searched through command titles and descriptions, now we'll search for any type of file.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
find command has
many options, and arguments include where you want to
search, operations you want to perform, and finally an expression of
what you're looking for. The capabilities of the
find command are vast, so we'll look
at a few simple cases.
Like most commands, help is available with double-dash
-name option offers the ability to
search by file name or an expression using wildcards. I'm reluctant to
detail other options here, so at this point let's be content with
So why is
find an important command?
Well, its capabilities are extensive, meaning you can use it to
simply find a file or to take other actions on those files.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go, let's start with a
find --help and scan that syntax.
It gets very very complex, so I suggest reviewing it later.
Next, let's go with find in the current directory using a dot
-name and the title like this
And last, let's broaden the search using a wildcard. Typing
find -name 'video1*.txt'.
Again, I'm reluctant to go any deeper at this point given the short window of time here.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
The man page (
man find) has guidance
on how to locate and take actions on a file at the same time. I
suggest looking at that.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Click below to subscribe to an extraordinarily helpful YouTube Channel. For updates, try out our no-spam email list and @factorpad on Twitter.
aproposcommand, hit Back.
sortcommand, click Next.
A newly-updated free resource. Connect and refer a friend today.