touch

Create an empty file or update its modification date

What it does

touch creates an empty file if there is none. If the file exists, its contents stay as they are and only the modification date changes.

Most often touch is a quick way to create a file you will open in an editor next. You can list several names at once: touch index.html style.css.

Syntax

touch <file>…

Examples

Related commands

Practise · All commands