touch — Change File Access and Modification Times

Synopsis

/usr/bin/touch [-acm][-r ref-file | -t time] file... 
/usr/bin/touch [-acm] date-time] file... 
/usr/bin/settime [-f ref-file] file... 

							
								

Description

Use the touch command to change access and modification times of files. If the file does not already exist, it is created.

You can specify the time used by -t time , by the corresponding time fields of the file referenced by -r ref-file , or by the date-time operand. If you specify none of these options, touch uses the current time (the value returned by the time(2) function).

If you specify neither the -a nor -m options, touch updates both ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.