| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: touch.1,v 1.18 2011/02/22 15:47:02 wiz Exp $ | | 1 | .\" $NetBSD: touch.1,v 1.19 2012/06/20 09:56:18 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1991, 1993 | | 3 | .\" Copyright (c) 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to Berkeley by | | 6 | .\" This code is derived from software contributed to Berkeley by |
7 | .\" the Institute of Electrical and Electronics Engineers, Inc. | | 7 | .\" the Institute of Electrical and Electronics Engineers, Inc. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -22,42 +22,42 @@ | | | @@ -22,42 +22,42 @@ |
22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | 22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | | 23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
31 | .\" SUCH DAMAGE. | | 31 | .\" SUCH DAMAGE. |
32 | .\" | | 32 | .\" |
33 | .\" @(#)touch.1 8.3 (Berkeley) 4/28/95 | | 33 | .\" @(#)touch.1 8.3 (Berkeley) 4/28/95 |
34 | .\" | | 34 | .\" |
35 | .Dd February 22, 2011 | | 35 | .Dd June 20, 2012 |
36 | .Dt TOUCH 1 | | 36 | .Dt TOUCH 1 |
37 | .Os | | 37 | .Os |
38 | .Sh NAME | | 38 | .Sh NAME |
39 | .Nm touch | | 39 | .Nm touch |
40 | .Nd change file access and modification times | | 40 | .Nd change file access and modification times |
41 | .Sh SYNOPSIS | | 41 | .Sh SYNOPSIS |
42 | .Nm | | 42 | .Nm |
43 | .Op Fl acfhm | | 43 | .Op Fl acfhm |
44 | .Op Fl r Ar file | | 44 | .Op Fl r Ar file |
45 | .Op Fl t Ar [[CC]YY]MMDDhhmm[.SS] | | 45 | .Op Fl t Ar [[CC]YY]MMDDhhmm[.SS] |
46 | .Ar file ... | | 46 | .Ar file ... |
47 | .Sh DESCRIPTION | | 47 | .Sh DESCRIPTION |
48 | The | | 48 | The |
49 | .Nm | | 49 | .Nm |
50 | utility sets the modification and access times of files to the | | 50 | utility changes the access and modification times of files to the |
51 | current time of day. | | 51 | current time of day. |
52 | If the file doesn't exist, it is created with default permissions. | | 52 | If the file doesn't exist, it is created with default permissions. |
53 | .Pp | | 53 | .Pp |
54 | The following options are available: | | 54 | The following options are available: |
55 | .Bl -tag -width Ds | | 55 | .Bl -tag -width Ds |
56 | .It Fl a | | 56 | .It Fl a |
57 | Change the access time of the file. | | 57 | Change the access time of the file. |
58 | The modification time of the file is not changed unless the | | 58 | The modification time of the file is not changed unless the |
59 | .Fl m | | 59 | .Fl m |
60 | flag is also specified. | | 60 | flag is also specified. |
61 | .It Fl c | | 61 | .It Fl c |
62 | Do not create the file if it does not exist. | | 62 | Do not create the file if it does not exist. |
63 | The | | 63 | The |
| @@ -115,30 +115,28 @@ The minute of the hour, from 0 to 59. | | | @@ -115,30 +115,28 @@ The minute of the hour, from 0 to 59. |
115 | The second of the minute, from 0 to 61. | | 115 | The second of the minute, from 0 to 61. |
116 | .El | | 116 | .El |
117 | .Pp | | 117 | .Pp |
118 | If the | | 118 | If the |
119 | .Dq CC | | 119 | .Dq CC |
120 | and | | 120 | and |
121 | .Dq YY | | 121 | .Dq YY |
122 | letter pairs are not specified, the values default to the current | | 122 | letter pairs are not specified, the values default to the current |
123 | year. | | 123 | year. |
124 | If the | | 124 | If the |
125 | .Dq SS | | 125 | .Dq SS |
126 | letter pair is not specified, the value defaults to 0. | | 126 | letter pair is not specified, the value defaults to 0. |
127 | .El | | 127 | .El |
128 | .Pp | | 128 | .Sh EXIT STATUS |
129 | The | | 129 | .Ex -std |
130 | .Nm | | | |
131 | utility exits 0 on success, and \*[Gt]0 if an error occurs. | | | |
132 | .Sh COMPATIBILITY | | 130 | .Sh COMPATIBILITY |
133 | The obsolescent form of | | 131 | The obsolescent form of |
134 | .Nm , | | 132 | .Nm , |
135 | where a time format is specified as the first argument, is supported. | | 133 | where a time format is specified as the first argument, is supported. |
136 | When no | | 134 | When no |
137 | .Fl r | | 135 | .Fl r |
138 | or | | 136 | or |
139 | .Fl t | | 137 | .Fl t |
140 | option is specified, there are at least two arguments, and the first | | 138 | option is specified, there are at least two arguments, and the first |
141 | argument is a string of digits either eight or ten characters in length, | | 139 | argument is a string of digits either eight or ten characters in length, |
142 | the first argument is interpreted as a time specification of the form | | 140 | the first argument is interpreted as a time specification of the form |
143 | .Dq MMDDhhmm[YY] . | | 141 | .Dq MMDDhhmm[YY] . |
144 | .Pp | | 142 | .Pp |