$ CLI Academy

Working with Files

Create Files & Folders

Make new directories and empty files from the command line.

mkdir creates a directory. Use -p to create parent folders as needed:

mkdir -p projects/cli-course/notes

touch creates an empty file or updates its timestamp. Great for placeholders:

touch notes/day1.md

$ Commands to try

$ mkdir practice
$ mkdir -p projects/cli-course
$ touch hello.txt
$ touch notes/day1.md

Practice exercise

Create a folder called practice, cd into it, and touch a file named notes.txt. Verify with ls.