Revision as of 17:44, 4 May 2018 editCpt Wise (talk | contribs)Extended confirmed users543 editsmNo edit summary← Previous edit | Latest revision as of 13:15, 27 September 2023 edit undoCitation bot (talk | contribs)Bots5,409,223 edits Removed parameters. | Use this bot. Report bugs. | #UCB_CommandLine | ||
(51 intermediate revisions by 16 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|File modification command on various operating systems}} | |||
{{manual|date=May 2014}} | |||
⚫ | {{lowercase}} | ||
{{Infobox software | |||
| name = touch | |||
| logo = | |||
| screenshot = Touch-example.png | |||
| screenshot size = | |||
| caption = Example of <code>touch</code> usage | |||
| author = ] | |||
| developer = Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith, ], ], ], ], ], Kris Heidenstrom | |||
| released = {{Start date and age|1979|1}} | |||
| latest release version = | |||
| latest release date = | |||
| programming language = ] | |||
| operating system = ], ], ], ], ], ], ], ], ], ], ], ], ], ] | |||
| platform = ] | |||
| genre = ] | |||
| license = ]: ]<br />FreeDOS: ]<br />ReactOS: ]<br />]: ]<br />]: ]<br />Plan 9: ] | |||
| website = | |||
}} | |||
In ], '''<code>touch</code>''' is a ] used to update the access date and/or modification date of a ] or ]. It is included in ] and ] ]s, ]'s ],<ref>{{Cite web|url=http://www.flexusergroup.com/flexusergroup/pdfs/swflexum.pdf|title=FLEX 9.0 User's Manual}}</ref> ]/] ], the ] shell,<ref>{{Cite web|url=https://aros.sourceforge.io/documentation/users/shell/index.php|title=AROS Research Operating System|website=aros.sourceforge.io}}</ref> the ] ] shell,<ref>{{cite book|author=Paul S. Dayan|year=1992|title=The OS-9 Guru - 1 : The Facts|publisher=Galactic Industrial Limited|isbn=0-9519228-0-7}}</ref> and ].<ref>{{Cite web|url=https://github.com/reactos/reactos|title=reactos/reactos|website=GitHub}}</ref> | |||
The command is also available for ]<ref>{{Cite web|url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/group-util.html|title=ibiblio.org FreeDOS Group -- Utilities|website=www.ibiblio.org}}</ref> and ].<ref>{{Cite web|url=https://sourceforge.net/projects/touchforwindows/|title=touch for Windows}}</ref> | |||
⚫ | ==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. <code>touch</code> 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 ] utilities or the ] ] 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 <code>touch</code> 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 ] (SUS) specifies that <code>touch</code> 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, <code>touch</code> uses the current time. | ||
⚫ | == |
||
A touch utility appeared in Version 7 AT&T UNIX. The version of <tt>touch</tt> bundled in ] ] was written by Paul Rubin, Arnold Robbins, Jim Kingdon, and David MacKenzie. | |||
==History== | |||
⚫ | The ] (SUS) specifies that < |
||
⚫ | A <code>touch</code> utility first appeared in ] ]. Today, the command is available for a number of different operating systems, including many ] and ] systems, ], ] and the ].{{which|date=January 2015 <!-- a short list here would be very useful -->}} | ||
The version of <code>touch</code> bundled in ] ] was written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith.<ref>{{Cite web|url=https://linux.die.net/man/1/touch|title=touch(1): change file timestamps - Linux man page|website=linux.die.net}}</ref> | |||
⚫ | |||
The command is available as a separate package for Microsoft Windows as part of the ] collection of ] ] ] of common GNU Unix-like utilities.<ref>{{Cite web|url=http://unxutils.sourceforge.net/|title=Native Win32 ports of some GNU utilities|website=unxutils.sourceforge.net}}</ref> The ] version was developed by Kris Heidenstrom and is licensed under the ].<ref>{{Cite web|url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/touch.html|title=ibiblio.org FreeDOS Package -- touch (Unix-like)|website=www.ibiblio.org}}</ref> ]<ref name="drdos6userguide"></ref> and ]<ref>{{Cite web|url=http://wiki.kolibrios.org/Shell|title=Shell - KolibriOS wiki|website=wiki.kolibrios.org}}</ref> include an implementation of the {{code|touch}} command. The {{Mono|touch}} command has also been ported to the ] operating system.<ref>{{cite web |title=IBM System i Version 7.2 Programming Qshell |language=en |author=IBM |website=] |author-link=IBM |url=https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc |access-date=2020-09-05 }}</ref> | |||
==See also== | ==See also== | ||
*] | *] | ||
*] | *] | ||
==References== | |||
{{Reflist}} | |||
==Further reading== | |||
*{{Cite book|author-last=McElhearn|author-first=Kirk|title=The Mac OS X Command Line: Unix Under the Hood|date=2006|publisher=]|isbn=978-0470113851}} | |||
==External links== | ==External links== | ||
{{Wikibooks|Guide to Unix|Commands}} | |||
* {{man|cu|touch|SUS}} | * {{man|cu|touch|SUS}} | ||
* {{man|1|touch|die.net}} | |||
* {{man|1|touch|Plan 9}} | |||
* {{man|1|touch|Inferno}} | |||
* | * | ||
* | |||
{{Unix commands}} | {{Unix commands}} | ||
{{Plan 9 commands}} | |||
{{Core Utilities commands}} | |||
{{Use dmy dates|date=March 2014}} | {{Use dmy dates|date=March 2014}} | ||
⚫ | {{lowercase |
||
] | ] | ||
] | ] | ||
] | |||
] | |||
] | |||
] |
Latest revision as of 13:15, 27 September 2023
File modification command on various operating systemsExample of touch usage | |
Original author(s) | AT&T Bell Laboratories |
---|---|
Developer(s) | Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith, TSC, Microware, Apple, Digital Research, Novell, Kris Heidenstrom |
Initial release | January 1979; 45 years ago (1979-01) |
Written in | C |
Operating system | Unix, Unix-like, Plan 9, Inferno, FLEX, OS-9, Classic Mac OS, Windows, DR DOS, AROS, FreeDOS, ReactOS, KolibriOS, IBM i |
Platform | Cross-platform |
Type | Command |
License | coreutils: GPLv3+ FreeDOS: GPLv2 ReactOS: BSD-4-Clause BusyBox: GPL-2.0-only Toybox: 0BSD Plan 9: MIT License |
In computing, touch
is a command used to update the access date and/or modification date of a computer file or directory. It is included in Unix and Unix-like operating systems, TSC's FLEX, Digital Research/Novell DR DOS, the AROS shell, the Microware OS-9 shell, and ReactOS.
The command is also available for FreeDOS and Microsoft Windows.
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.
The version of touch
bundled in GNU coreutils was written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith.
The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities. The FreeDOS version was developed by Kris Heidenstrom and is licensed under the GPL. DR DOS 6.0 and KolibriOS include an implementation of the touch
command. The touch command has also been ported to the IBM i operating system.
See also
References
- "FLEX 9.0 User's Manual" (PDF).
- "AROS Research Operating System". aros.sourceforge.io.
- Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN 0-9519228-0-7.
- "reactos/reactos". GitHub.
- "ibiblio.org FreeDOS Group -- Utilities". www.ibiblio.org.
- "touch for Windows".
- "touch(1): change file timestamps - Linux man page". linux.die.net.
- "Native Win32 ports of some GNU utilities". unxutils.sourceforge.net.
- "ibiblio.org FreeDOS Package -- touch (Unix-like)". www.ibiblio.org.
- DR DOS 6.0 User Guide Optimisation and Configuration Tips
- "Shell - KolibriOS wiki". wiki.kolibrios.org.
- IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). IBM. Retrieved 5 September 2020.
Further reading
- McElhearn, Kirk (2006). The Mac OS X Command Line: Unix Under the Hood. John Wiley & Sons. ISBN 978-0470113851.
External links
touch
– Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Grouptouch(1)
– Linux User Commands Manualtouch(1)
– Plan 9 Programmer's Manual, Volume 1touch(1)
– Inferno General commands Manual- examples showing how to use touch
Unix command-line interface programs and shell builtins | |
---|---|
File system | |
Processes | |
User environment | |
Text processing | |
Shell builtins | |
Searching | |
Documentation | |
Software development | |
Miscellaneous | |
|
Plan 9 command-line interface programs and shell builtins | |
---|---|
File system | |
Processes | |
User environment | |
Text processing | |
Shell builtins | |
Networking | |
Searching | |
Software development | |
Miscellaneous | |
GNU Core Utilities command-line interface programs | |
---|---|
File system | |
Text utilities | |
Shell utilities |
Categories: