Touch (Unix)

In computing, `touch` is a command in Unix and Unix-like operating systems used to update the access date and/or modification date of a computer file or directory. The command is also available in the AROS shell.[1] 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.

## Contents

* 1 Overview
* 2 See also
* 3 References
* 4 External links

## 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[2] and the classic Mac OS.[which?]

## See also

* System time
* List of Unix programs

## References

1. ↑ http://aros.sourceforge.net/documentation/users/shell/index.php
2. ↑ touch for Windows

## External links

* `touch` – Commands & Utilities Reference, The Single UNIX Specification, Issue 7 from The Open Group
* examples showing how to use touch

* v
* t
* e

Unix command-line interface programs and shell builtins

File system|

* cat
* chmod
* chown
* chgrp
* cksum
* cmp
* cp
* dd
* du
* df
* file
* fuser
* ln
* ls
* mkdir
* mv
* pax
* pwd
* rm
* rmdir
* split
* tee
* touch
* type
* umask

Processes|

* at
* bg
* crontab
* fg
* kill
* nice
* ps
* time

User environment|

* env
* exit
* logname
* mesg
* talk
* tput
* uname
* who
* write

Text processing|

* awk
* basename
* comm
* csplit
* cut
* diff
* dirname
* ed
* ex
* fold
* head
* iconv
* join
* m4
* more
* nl
* paste
* patch
* printf
* sed
* sort
* strings
* tail
* tr
* uniq
* vi
* wc
* xargs

Shell builtins|

* alias
* cd
* echo
* test
* unset
* wait

Searching|

* find
* grep

Documentation|

* man

Software development|

* ar
* ctags
* lex
* make
* nm
* strip
* yacc

Miscellaneous|

* bc
* cal
* expr
* lp
* od
* sleep
* true and false

* Categories
* Standard Unix programs
* Unix SUS2008 utilities
* List

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Touch_(Unix)&oldid=733745"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template