Section: Create, touch, truncate

Create empty file or update timestamp

bash
bash
touch notes.txt

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Create, touch, truncate
Empty a file without deleting it
Reset file length to zero bytes.
OpenIn sheetbashsame section
Write output to file and stdout
Save command output while still printing it.
OpenIn sheetbashsame section
Print file content
Output a file to standard output.
Show unified diff
Compare two files in patch-friendly format.
Split file into chunks
Split a large file into 100 MB parts.
Open file with pager
Scroll through a file interactively.