Touch (command): Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 11: | Line 11: | ||
| latest release version = |
| latest release version = |
||
| latest release date = |
| latest release date = |
||
| operating system = [[Unix]] and [[Unix-like]], [[FLEX (operating system)|FLEX]], [[OS-9]], [[Classic Mac OS]], [[FreeDOS]], [[AROS Research Operating System|AROS]], [[Microsoft Windows|Windows]], [[ReactOS]] |
| operating system = [[Unix]] and [[Unix-like]], [[FLEX (operating system)|FLEX]], [[OS-9]], [[Classic Mac OS]], [[FreeDOS]], [[AROS Research Operating System|AROS]], [[Microsoft Windows|Windows]], [[ReactOS]], [[KolibriOS]] |
||
| genre = [[Command (computing)|Command]] |
| genre = [[Command (computing)|Command]] |
||
| license = [[coreutils]]: [[GNU General Public License#Version 3|GNU GPL v3]]<br /> |
| license = [[coreutils]]: [[GNU General Public License#Version 3|GNU GPL v3]]<br /> |
||
Line 29: | Line 29: | ||
The version of <code>touch</code> bundled in [[GNU]] [[coreutils]] was written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith.<ref>https://linux.die.net/man/1/touch</ref> |
The version of <code>touch</code> bundled in [[GNU]] [[coreutils]] was written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith.<ref>https://linux.die.net/man/1/touch</ref> |
||
The command is available as a separate package for Microsoft Windows as part the [[UnxUtils]] collection of [[Native (computing)|native]] [[Windows API|Win32]] [[porting|ports]] of common [[GNU]] [[Unix-like]] [[utility|utilities]].<ref>http://unxutils.sourceforge.net/</ref> The [[FreeDOS]] version was developed by Kris Heidenstrom and is licensed under the [[GNU General Public License|GPL]].<ref>http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/touch.html</ref> |
The command is available as a separate package for Microsoft Windows as part the [[UnxUtils]] collection of [[Native (computing)|native]] [[Windows API|Win32]] [[porting|ports]] of common [[GNU]] [[Unix-like]] [[utility|utilities]].<ref>http://unxutils.sourceforge.net/</ref> The [[FreeDOS]] version was developed by Kris Heidenstrom and is licensed under the [[GNU General Public License|GPL]].<ref>http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/touch.html</ref> [[KolibriOS]] includes an implementation of the {{code|touch}} command.<ref>http://wiki.kolibrios.org/wiki/Shell</ref> |
||
==See also== |
==See also== |
Revision as of 12:45, 11 August 2019
Original author(s) | AT&T Bell Laboratories |
---|---|
Developer(s) | Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith, TSC, Microware, Apple, Kris Heidenstrom |
Initial release | January 1979 |
Operating system | Unix and Unix-like, FLEX, OS-9, Classic Mac OS, FreeDOS, AROS, Windows, ReactOS, KolibriOS |
Type | Command |
License | coreutils: GNU GPL v3 FreeDOS: GNU GPL v2 |
In computing, touch
is a command in Unix and Unix-like operating systems, TSC's FLEX,[1] the AROS shell,[2] and the Microware OS-9 shell[3] used to update the access date and/or modification date of a computer file or directory. The command is also available for FreeDOS,[4] Microsoft Windows,[5] and ReactOS.[6]
Overview
In its default usage, it is the equivalent of creating or opening a file and saving it without any change to the file contents. touch
avoids opening, saving, and closing the file. Instead it simply updates the dates associated with the file or directory. An updated access or modification date can be important for a variety of other programs such as backup utilities or the make command-line interface programming utility. Typically these types of programs are only concerned with files which have been created or modified after the program was last run. The touch
command can also be useful for quickly creating files for programs or scripts that require a file with a specific name to exist for successful operation of the program, but do not require the file to have any specific content.
The Single Unix Specification (SUS) specifies that touch
should change the access times, modification times, or both, for a file. The file is identified by a pathname supplied as a single argument. It also specifies that if the file identified does not exist, the file is created and the access and modification times are set as specified. If no new timestamps are specified, touch
uses the current time.
History
A touch
utility first appeared in Version 7 AT&T UNIX. Today, the command is available for a number of different operating systems, including many Unix and Unix-like systems, DOS, Microsoft Windows and the classic Mac OS.[which?]
The version of touch
bundled in GNU coreutils was written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith.[7]
The command is available as a separate package for Microsoft Windows as part the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.[8] The FreeDOS version was developed by Kris Heidenstrom and is licensed under the GPL.[9] KolibriOS includes an implementation of the touch
command.[10]
See also
References
- ^ FLEX 9.0 User’s Manual
- ^ AROS Research Operating System
- ^ Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN 0-9519228-0-7.
- ^ http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-util.html
- ^ touch for Windows
- ^ https://github.com/reactos/reactos/blob/master/modules/rosapps/applications/cmdutils/touch/touch.c
- ^ https://linux.die.net/man/1/touch
- ^ http://unxutils.sourceforge.net/
- ^ http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/touch.html
- ^ http://wiki.kolibrios.org/wiki/Shell
Further reading
- McElhearn, Kirk (2006). The Mac OS X Command Line: Unix Under the Hood. John Wiley & Sons. ISBN 978-0470113851.
External links
- The Single UNIX Specification, Version 4 from The Open Group – Shell and Utilities Reference,
- examples showing how to use touch