Wiki source for CommandTouch

Show raw source

=====Command touch=====

This command is part of the [[CommandsPosix posix]] extensions and needs to be imported to be available to the shell.
See [[CommandsPosix Posix Commands]]

**touch** Creates file or updates timestamp (last mod date) of file.

touch [options] file


||-r,-reference reference_file|| Use reference_file as the source for the timestamp||


If file does not exist, creates a new empty file. Otherwise updates the last modification time of the specified file.
If "-r reference_file" is given, then instead of setting the last mod date to the current time, sets it to the same last mod date of the reference file.

====Return Value====
Returns 0 if the command executed successfully, 1 if there was an error.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki