Creating Files (`touch` Command)
The touch command is used to create an empty file or update the timestamp of an existing file.
Command Structure: touch FILE_NAME
Notes
- If the file does not exist,
touchcreates a new empty file. - If the file already exists,
touchwill only update the last modified time.
Examples
touch notes.txt # Create a single empty file
touch a.txt b.txt c.txt # Create multiple files at the same time
touch report.pdf # Create a non-text file (empty)
touch *.txt # Update timestamps of all .txt files
Creating Directories (`mkdir` Command)
The mkdir command is used to create new directories (folders).
Command Structure:mkdir DIRECTORY_NAME
Important Notes
mkdircan create one or multiple directories at once.- Use
-pto create parent directories that do not exist (nested folders).