Forrest logo
back to the touch tool

linux:files:create

Create or update a file.
$ touch ${filename}
try on your machine

This command creates a new empty file with the specified filename.

The touch command is used to update the timestamp of a file, but if the file does not exist, it creates a new empty file with the given name. The curly braces surrounding the filename are used to substitute the variable's value. Therefore, when executed with a specific value for the variable, touch would create a new file with that value as its name.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • How to create. ?
  • How do I create a file?
back to the touch tool