Creating Files & Folders
One of the first things you'll need to do in any project is organize your work by creating new files and folders.
1. mkdir (Make Directory)
The mkdir command is used to create one or more new directories (folders).
Bash
# Create a single directory mkdir MyFolder # Create multiple directories at once mkdir Folder1 Folder2 Folder3
Creating Nested Folders: Use the -p option to create a whole path of folders at once.
Bash
mkdir -p Project/Source/Images
2. touch
The touch command is the easiest way to create a new, empty file. If the file already exists, it simply updates the "last modified" timestamp.
Bash
# Create an empty text file touch notes.txt # Create multiple files at once touch index.html style.css script.js
Tip: Filenames in Linux are case-sensitive. This means Notes.txt and notes.txt are two different files!