## 6. Finding Things
### a) How to select lines matching patterns in text files...
-To find information within files, you use a command called `grep`.
+To find information within files, you use a command called `grep`.
+
| Example command | Description |
|--------------------------------|------------------------------------------------------------------------------------------------|
| `grep [options] day haiku.txt` | finds every instance of the string `day` in the file haiku.txt and pipes it to standard output | |
### b) How to find files with certain properties...
To find file and directory names, you use a command called `find`
+| Example command | Description |
+|------------------|-------------|
+| `find . -type d` | `find` recursively descends the directory tree for each path listed to match the expression given in the command line with file or directory names in the search path |
+
+
+#### b.1) Commonly used `find` options
-* **`find . -type d` -->
- * **`-type [df]`** --> d lists directories; f lists files
- * **`-maxdepth n`** --> `find` automatically searches subdirectories. If you don't want that, specify the number of levels below the working directory you would like to search
- * **`-mindepth n`** --> starts `find`'s search n levels below the working directory
+| | `find` options |
+|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `-type [df]` | `d` lists directories; `f` lists files |
+| `-maxdepth n` | `find` automatically searches subdirectories. If you don't want that, specify the number of levels below the working directory you would like to search |
+| `-mindepth n` | starts `find`'s search `n` levels below the working directory |