[0m


TOUCH(1)	    UNIX Programmer's Manual		 TOUCH(1)



[1mNAME
     [0mtouch - update date last modified of a file

[1mSYNOPSIS
     touch [0m[ [1m-c [0m] [ [1m-f [0m] [ [1m-t [0m] [ [1m-a [0m] [ [1m-m [0m] [ _m_m_d_d_h_h_m_m [ _y_y ] ]
     file ...

[1mDESCRIPTION
     [0m_T_o_u_c_h attempts to set the modified date of each _f_i_l_e.  If a
     _f_i_l_e exists and a time is not specified, this is done by
     reading a character from the file and writing it back.  If a
     _f_i_l_e does not exist, an attempt will be made to create it
     unless the [1m-c [0moption is specified. If the file to be touched
     is of zero length, _u_t_i_m_e_s() is called to update both the
     time last modified and the time last accessed (unless either
     the [1m-a [0mor [1m-m [0moptions are used).
     The -_f option will attempt to force the touch in spite of
     read and write permissions on a _f_i_l_e.
     The [1m-t [0moption can be used to reset the date on an existing
     file (kept in for backwards compatability).  The last modi-
     fied time is changed to that given by the _d_a_t_e parameter
     which should be in the same format as accepted by the
     _d_a_t_e(1) command.  If this option is given the file is not
     written - however it must still be writable unless the [1m-f
     [0mflag is given and it must be owned by the user (unless the
     user is the superuser.)
     The -_m option updates only the modification time. The -_a
     option updates only the access time. The default action if
     neither of these two options are given is [1m-am

EXIT STATUS
     [0mThe exit status from _t_o_u_c_h is the number of files that could
     not be successfully modified (including the files that did
     not exist and were not created).

[1mBUGS
     [0mComplete numeric filenames may cause confusion as touch may
     assume that this is a _d_a_t_e argument. This is only a cause of
     concern if there are multiple filenames. eg.
     The command:

     [1mtouch [0m01010000

     will create (or update the access and modification times of)
     a file called 01010000.
     Whereas, the command:

     [1mtouch [0m10100000 file1

     will update file1 to have the access and modification times
     set to 1st January 00:00.	If file1 doesn't exist then the
     access and modification times will be set to the current



Printed 10/12/92    Revision 1.5 of 17/10/90			1






TOUCH(1)	    UNIX Programmer's Manual		 TOUCH(1)



     date and time.

     The -t option only updates the modification time even if the
     -a option is also given.

[1mSEE ALSO
     [0mutimes(2), date(1)
















































Printed 10/12/92    Revision 1.5 of 17/10/90			2



[0m