Finding files and folders
Our next topic of the day is to learn to use the find
command, an incredibly useful command. It can be used in a variety of different ways – to find files and folders according to specific criteria (permissions, ownership, modified date, and others), but also to prepare data to be further manipulated after the find
command. We'll go through some examples of both principles in this recipe.
Getting ready
We need to leave our cli1
virtual machine running. If it's not powered on, we need to power it back on.
How to do it…
Let's use a couple of examples to explain how the find
command works. Here are some examples that we're going to use:
- Finding files in the
/
directory that have permission2755
- Finding files in the
/
directory owned by the userjill
- Finding files in the
/
directory owned by a group student - Finding files in the
/
directory with a specific name (for example,network
) - Finding...