standard Unix program used to change a file's access and modification timestamps
touch
pubs.opengroup.org →The touch utility shall change the last data modification timestamps, the last data access timestamps, or both. The time used can be specified by the -t time option-argument, the corresponding time fields of the file referenced by the -r ref file option-argument, or the -d date time option-argument, as specified in the following sections. If none of these are specified, touch shall use the current time. For each file operand, touch shall perform actions equivalent to the following functions defined in the System Interfaces volume of POSIX.1-2017: The access time and the modification time, set as described in the OPTIONS section, are used as the first and second elements of the times array argument, respectively. 3. The access time and the modification time, set as described in the OPTIONS section, are used as the first and second elements of the times array argument, respectively. Do not create a specified file if it does not exist. Do not write any diagnostic messages concerning this condition. Use the specified date time instead of the current time. The option-argument shall be a string of the form: If the resulting time precedes the Epoch, the behavior is implementation-defined. If the time cannot be represented as the file's timestamp, touch shall exit immediately with an error status. Use the corresponding time of the file named by the pathname ref file instead of the current time. Use the specified time instead of the current time. The option-argument shall be a decimal number of the form: The resulting time shall be affected by the value of the TZ environment variable. If the resulting time value precedes the Epoch, the behavior is implementation-defined. If the time is out of range for the file's timestamp, touch shall exit immediately with an error status. The range of valid times past the Epoch is implementation-defined, but it shall extend to at least the time 0 hours, 0 minutes, 0 seconds, January 1, 2038, Coordinated Universal Time. Some implementations may not be able to represent dates beyond January 18, 2038, because they use signed int as a time holder. Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( Create or update a file called gwc ; the resulting file has both the last data modification and last data access timestamps set to November 12, 2007 at 10:15:30 local time with a fractional second timestamp of .002 seconds: Create or update a file called ajosey ; the resulting file has both the last data modification and last data access timestamps set to November 12, 2007 at 10:15:30 UTC with a fractional second timestamp of .002 seconds: Create or update a file called eggert ; the resulting file has the last data access timestamp set to the corresponding time of the file named mark instead of the current time. If the file exists, the last data modification time is not changed: There are some significant differences between the touch utility in this volume of POSIX.1-2017 and those in System V and BSD systems. They are upwards-compatible for historical applications from both implementations: The -r option was added because several comments requested this capability. This option was named -f in an early proposal, but was changed because the -f option is used in the BSD version of touch with a different meaning. At least one historical implementation of touch incremented the exit code if -c was specified and the file did not exist. This volume of POSIX.1-2017 requires e
Excerpt from a page describing this subject · 17,416 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).