Linux Commands Helper

💬 Your AI-powered Linux assistant

touch Command - Change File Timestamps or Create Empty Files

touch is used to update the access and modification times of files. If the file does not exist, it will be created as an empty file.

Syntax

touch [options] file...

Examples

touch newfile.txt

Create an empty file named newfile.txt.

touch -t 202401010101.01 file.txt

Set the timestamp of file.txt to a specific date and time.

Notes

  • Does not modify file contents.
  • Useful for creating empty files quickly.
  • Can be used in scripts to ensure files exist before writing.

© 2025 Linux Commands Helper. All rights reserved.

This project is under construction. Feedback and contributions are welcome.

Fazier badgeFeatured on Startup Fame