Calmcode - zsh: glob

Glob

1 2 3 4 5 6 7

Here's all the commands we've used to create the file structure.

# From an earlier video
mkdir dir1
mkdir dir2
touch dir1/file_a.txt
touch dir1/file_b.txt
touch dir2/file_c.txt
# From this video
mkdir dir1/dir11
touch dir1/dir11/logz.log
touch dir1/dir11/script.py

You can confirm the file structure via tree.

> tree
.
├── dir1
│   ├── dir11
│   │   ├── logz.log
│   │   └── script.py
│   ├── file_a.txt
│   └── file_b.txt
└── dir2
    └── file_c.txt

From here you can be expressive finding files and folders.

l **/*.(txt|py)