File and Folder Operations

touch

Creates empty files or updates timestamps.

touch is often used to create an empty file quickly, but its original job is to update access and modification times.

Syntax
touch [options] file...

Arguments explained

  • file is the file to create or update.
  • -c updates timestamps only if the file already exists.
  • -t sets a specific timestamp.

Common examples

Create a note file
touch notes.txt

Creates notes.txt if it does not already exist.

Update a timestamp
touch existing.log

Refreshes the modification time without changing file contents.

touch Command
FieldDetails
Commandtouch
CategoryFile and Folder Operations
Primary useCreates empty files or updates timestamps.
Syntaxtouch [options] file...