touch

Aliases: 
  • new
  •  
    Parameters:
    Name Type Required Default Hint
    file string true File to create
    force boolean false false If forced, then file will be recreated even if it exists
    open boolean false false Open the file after creating it

    Command Usage

    Create a new file according to its name if it does not exist. If it exists, modify its last updated date and time to now.

    touch file.txt
    Use the open parameter to open the file in your default editor after creating it
    touch index.cfm --open
    Use the force parameter to overwrite the contents of the file to be empty even if it exists.
    touch file.txt --force