Misplaced Pages

Touch (command): Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 12:02, 31 August 2017 editSmuckola (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers30,635 editsm deleting stuff that's literally WP:NOTMANUAL WP:NOTHOWTO← Previous edit Revision as of 17:44, 4 May 2018 edit undoCpt Wise (talk | contribs)Extended confirmed users543 editsmNo edit summaryNext edit →
Line 1: Line 1:
{{manual|date=May 2014}} {{manual|date=May 2014}}


'''touch''' is a standard ] ] ] which is used to update the access date and or modification date of a ] or directory. 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 ] utilities or the ] 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. Touch 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. '''touch''' is a standard ] ] ] which is used to update the access date and/or modification date of a ] or directory. 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 ] utilities or the ] 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. Touch 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.


== Overview == == Overview ==

Revision as of 17:44, 4 May 2018

This article is written like a manual or guide. Please help rewrite this article and remove advice or instruction. (May 2014)

touch is a standard Unix command-line interface program which is used to update the access date and/or modification date of a file or directory. 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. Touch 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.

Overview

A touch utility appeared in Version 7 AT&T UNIX. The version of touch bundled in GNU coreutils was written by Paul Rubin, Arnold Robbins, Jim Kingdon, and David MacKenzie.

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.

Programs that perform similar operations as the Unix touch utility are available for other operating systems, including Microsoft Windows and the classic Mac OS.

See also

External links

Unix command-line interface programs and shell builtins
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous

Categories: