Touch (Unix) - Usage

Usage

The SUS mandates the following options:

-a, change the access time only
-c, if the file does not exist, do not create it and do not report this condition
-d date_time, use the date_time specified to update the access and modification times
-m, change the modification time only
-r file, use the access and modification times of file
-t time, use the time specified (in the format below) to update the access and modification times

The time is specified in the format yy]MMDDhhmm where MM specifies the two-digit numeric month, DD specifies the two-digit numeric day, hh specifies the two-digit numeric hour, mm specifies the two-digit numeric minutes. Optionally ss specifies the two-digit seconds, cc specifies the first two digits of the year, and yy specifies the last two digits of the year.

Note that if invoked without these options, the standard specifies that the current date and time are used to change the access and modification times. This behaviour simulates an update to a file without having to change it, which may be desirable in certain situations (see the example below).

Other Unix and Unix-like operating systems may add extra options. For example, GNU touch adds a -d option, which enables time input in formats other than that specified.

Note that the dates of creation of symbolic links are not changed .

Read more about this topic:  Touch (Unix)

Famous quotes containing the word usage:

    Girls who put out are tramps. Girls who don’t are ladies. This is, however, a rather archaic usage of the word. Should one of you boys happen upon a girl who doesn’t put out, do not jump to the conclusion that you have found a lady. What you have probably found is a lesbian.
    Fran Lebowitz (b. 1951)

    Pythagoras, Locke, Socrates—but pages
    Might be filled up, as vainly as before,
    With the sad usage of all sorts of sages,
    Who in his life-time, each was deemed a bore!
    The loftiest minds outrun their tardy ages.
    George Gordon Noel Byron (1788–1824)

    I am using it [the word ‘perceive’] here in such a way that to say of an object that it is perceived does not entail saying that it exists in any sense at all. And this is a perfectly correct and familiar usage of the word.
    —A.J. (Alfred Jules)