Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ touch(C) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

date(C)

utime(S)


 touch(C)                        19 June 1992                        touch(C)


 Name

    touch - update access and modification times of a file

 Syntax

    touch [ -amc ] [ mmddhhmm[yy] ] files

 Description

    The touch command causes the access and modification times of each argu-
    ment to be updated.  If no time is specified (see date(C)) the current
    time is used.  If a new file is created using touch, the modification and
    access times can be set to any time.  However, the creation time is auto-
    matically set to the current time at the time of creation, and cannot be
    changed. The first mm refers to the month, dd refers to the day, hh
    refers to the hour, the second mm refers to the minute, and yy refers to
    the year.  The -a and -m options cause touch to update only the access or
    modification times respectively (default is -am).  The -c option silently
    prevents touch from creating the file if it did not previously exist.

    The return code from touch is the number of files for which the times
    could not be successfully modified (including files that did not exist
    and were not created).

 See also

    date(C) , utime(S)

 Standards conformance

    touch is conformant with:

    AT&T SVID Issue 2;
    and X/Open Portability Guide, Issue 3, 1989.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026