touch command

The command that creates an empty file if it does not exist, or updates the modification time of one that does.

In more detail

Its real job is setting timestamps; creating a missing file is a side effect people rely on. Touching an existing file never changes its contents.

Example

touch 'my notes.txt'

Related terms

Taught in

References