Linux Touch Command Maker

Create empty files or update the timestamp of existing files.

Touch Command Options
Specify the file(s) to touch. Separate multiple files with spaces.
Use -a to change only the access time of the file(s).
Use -c or --no-create to avoid creating files if they don't exist.
Use -d to specify a custom date and time.
Use -m to change only the modification time of the file(s).
Use -r or --reference to use the times of a reference file.
Use -t to set a custom timestamp in [[CC]YY]MMDDhhmm[.ss] format.
Use --help to display help information for the touch command.
Use --version to display version information for the touch command.
Generated Command
touch
A few Touch Command Examples
Command Description
touch test.txt Create an Empty File
touch test1.txt test2.txt test3.txt Create Multiple Files
touch existing_test.txt Update the Timestamp of an Existing File
touch -t 202402171230 test.txt Change Timestamp to a Specific Date and Time
touch /home/user/newtest.txt Create a File in a Specific Directory
touch -r oldtest.txt newtest.txt Use Reference File Timestamp
touch --no-create test.txt Create a File Without Overwriting an Existing One
How to Use This Tool

This tool helps you build Linux touch commands easily. Select options from the checkboxes and input fields to generate the command. The live preview will be updated automatically.