How to create a new file


This command has two purposes. First, it will update the last modified time on a given file. This is useful if you want to update a cache or simply make a program reload a configuration file. Second, if the file doesn’t exist, touch will create it:


You can see that initially, it created a file called test. The initial timestamp is Oct 23 05:20. A minute or so later we used touch on the file again and took another look. You can see that the timestamp now shows Oct 23 05:21.


We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close