Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ touch(1) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

date(1)

utime(2)






       touch(1)                                                    touch(1)


       NAME
             touch - update access and modification times of a file

       SYNOPSIS
             touch [-amc] [-r ref_file | -t time] file ...
             touch [-amc] [mmddhhmm[yy]] file ...

       DESCRIPTION
             touch causes the access and modification times of each
             argument to be updated.  The file name is created if it does
             not exist.  If no time is specified the current time is used.
             [See date(1) for a description of the second synopsis' time
             format.]

       OPTIONS
             -a    Update only the access time.

             -m    Update only the modification time.

                   If neither -a nor -m is specified, the effect is the
                   same as -am.

             -c    Silently prevent touch from creating the file if it did
                   not previously exist.

             -r ref_file
                   Use the corresponding time of ref_file instead of the
                   current time.

             -t time
                   Use time instead of the current time. time is a decimal
                   number of the form:
                         [[CC]YY]MMDDhhmm[.SS]

                   where each two digits represent the following:
                               MM   month of the year (01-12)
                               DD   day of the month (01-31)
                               hh   hour of the day (00-23)
                               mm   minute of the hour (00-59)
                               CC   first two digits of the year (the century)
                               YY   second two digits of the year
                               SS   second of the minute (0-61)

                   CC and YY are optional.  If neither is given, the
                   current year is assumed.  If YY is specified, but CC is
                   not, CC is derived as follows:


                           Copyright 1994 Novell, Inc.               Page 1













      touch(1)                                                    touch(1)


                              If YY is:   CC becomes:
                              _______________________
                                69-99         19
                                00-68         20

                  The range for SS is (00-61), because of leap seconds. If
                  SS is 60 or 61 and the resulting time, as affected by
                  the TZ environment variable, does not refer to a leap
                  second; the resulting time shall be one or two seconds
                  after a time where SS is 59. If SS is not given it is
                  assumed to be zero.

      DIAGNOSTICS
            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).

            If the POSIX2 environment variable is set and exported, files
            that did not exist and were not created are not considered to
            be errors, and will not increment the return code.

      FILES
            /usr/lib/locale/locale/LC_MESSAGES/uxcore.abi
                  language-specific message file [See LANG on environ
                  (5).]

      REFERENCES
            date(1), utime(2)

      NOTICES
            Users familiar with the BSD environment will find that the -f
            option is accepted, but ignored.  The -f option is unnecessary
            since touch will succeed for all files owned by the user
            regardless of the permissions on the files.

            touch assumes that an all numeric entry is a date and so will
            not update the times for a file when an all numeric filename
            is specified.

            The -t time option should be used in preference to the second
            synopsis usage, since the second synopsis may not be supported
            in future releases.






                          Copyright 1994 Novell, Inc.               Page 2








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