minix/man/man1/touch.1

50 lines
1.5 KiB
Groff
Raw Normal View History

2005-05-02 15:01:42 +02:00
.TH TOUCH 1
.SH NAME
touch \- change file access and modification times
2005-05-02 15:01:42 +02:00
.SH SYNOPSIS
\fBtouch\fR [\fB\-c\fR] [\fB\-a\fR] [\fB\-m\fR] [\fB\-r\fR file] [\fB\-t\fR [CC[YY]]MMDDhhmm[.ss]] [MMDDhhmm[YY]] \fIfile\fR ...\fR
2005-05-02 15:01:42 +02:00
.br
.de FL
.TP
\\fB\\$1\\fR
\\$2
..
.de EX
.TP 20
\\fB\\$1\\fR
# \\$2
..
.SH OPTIONS
.FL "\-c" "Do not create the file if it doesn't already exist"
.FL "\-a" "Change access time"
.FL "\-m" "Change modification time"
.FL "\-r file" "Apply time of specified file"
.FL "\-t [CC[YY]]MMDDhhmm[.ss]]" "Apply time specified"
.FL "\-t [MMDDhhmm[YY]]" "Apply time specified (alternate form)"
2005-05-02 15:01:42 +02:00
.SH EXAMPLES
.EX "touch *.h" "Make the \fI.h\fP files look recent"
.EX "touch -t 199610010000 *" "Change date and time of all files in current directory to midnight Oct 1, 1996"
2005-05-02 15:01:42 +02:00
.SH DESCRIPTION
.PP
With no options specified, the times of last modification and last access
are set to the current time.
2005-05-02 15:01:42 +02:00
This command is mostly used to trick
.I make
into thinking that a file is more recent than it really is.
If the file being touched does not exist, it is created, unless the \fB\-c\fR
flag is present.
.PP
The \fB\-a\fR or \fB\-m\fR flag may be used to change only the access or
modification time. The \fB\-r\fR or \fB\-t\fR flag may be used to change
the times to match the times of another file or to a specified time.
2005-05-02 15:01:42 +02:00
.SH "SEE ALSO"
.BR utime (2).
.SH "AUTHOR"
.PP
Original author unknown. Rewritten for POSIX by Peter Holzer
(hp@vmars.tuwien.ac.at).
.\" man page updated by A. S. Woodhull 2005-01-15