Touch is a Unix command-line program to change the access and modification time of a file or directory. It is a standard program of Unix-like operating systems according to the POSIX standard, which appeared in Version 7 AT & T UNIX. touch was formerly a frontend for the POSIX system call utime () ( utime ( 3) - Debian GNU / Linux library calls manual page), which operates with only second accuracy, in current systems, touch is a frontend for the POSIX system call utimensat () which nanosecond- accurate level. In addition to the free UNIX - original implementation, there is also the GNU system in the core utilities included touch.
Operation and important options
You can insert any Unix time or - as the default behavior when no specification - are set to the current system time. The Single Unix Specification (SUS ) writes the options -a,- c,- m,- r and- t before.
- If -a added as an option, only the time of the last call is changed, but not the time of creation.
- With -c only the change in time of an existing file is changed, but no file is created if one specifies the name of a nonexistent file.
- -m " touches " only change the date but not the time of acquisition.
- Use the-r option can be the time stamp of a reference file to the target copy.
- T [yy ] MMDDhhmm [. ss] uses the specified place at the current time.