touch command means Change file timestamps. The touch
command in Linux is used to create empty files or update the timestamp of existing files.

Syntax
touch [OPTION]… FILE…
On the man page, the describes it
- touch – change file timestamps.
- man touch – More details information about touch command.
touch command in Linux with Examples
Create a new file:
$ touch devopsroles.txt
Create multiple files at once:
touch file1.txt file2.txt file3.txt
Set a specific timestamp:
touch -t 202306151200.00 filename.txt
Create a new file with specific permissions:
touch -m 644 filename.txt
Update the timestamp of a file
touch filename.txt
Conclusion
touch command in Linux is a simple command in Linux. It is the most popular in-use terminal Linux change file timestamps.
You can find more options and details on the touch
command’s manual page by running man touch
in the terminal. Thank you for reading the DevopsRoles page!
1 thought on “touch command in Linux with Examples”