touch

Create an empty file or update its timestamp

touch creates an empty file if it doesn't exist, or updates the access and modification timestamps if it does. Used in scripts to create placeholder files or signal flags between processes.

Example

$ touch deploy.lock
$ ls -l deploy.lock
-rw-r--r-- 1 ubuntu ubuntu 0 Jan 15 14:23 deploy.lock
Tip: Type it yourself in the terminal below - reading is not the same as doing.