163 lines
4.0 KiB
HTML
163 lines
4.0 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8">
|
|
<title>touch - Change file access and modification times</title>
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</HEAD>
|
|
<body bgcolor="#FFFFFF">
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
|
|
|
|
<h2>touch - Change file access and modification times</h2>
|
|
|
|
<strong>Synopsis</strong>
|
|
|
|
<p><strong>touch [-acfm] [-r</strong> <em>ref_file</em><strong>]
|
|
[-t</strong> [[CC]YY]MMDDhhmm[.SS] <strong>] [-C</strong> <em>
|
|
ccsid</em><strong>]</strong> <em>file</em> ...</p>
|
|
|
|
<p><strong>Description</strong></p>
|
|
|
|
<p>The <strong>touch</strong> utility sets the modification and
|
|
access times of files to the current time of day. If the <em>
|
|
file</em> doesn't exist, it is created with default
|
|
permissions.</p>
|
|
|
|
<p><strong>Options</strong></p>
|
|
|
|
<dl>
|
|
<dt><strong>-a</strong></dt>
|
|
|
|
<dd>Change the access time of <em>file</em>. The modification time of
|
|
the file is not changed unless the <strong>-m</strong> flag is also
|
|
specified.</dd>
|
|
|
|
<dt><strong>-C</strong> <em>ccsid</em></dt>
|
|
|
|
<dd>If <em>file</em> does not exist, create the file with the specified
|
|
<em>ccsid</em>. This option overrides the value of the QIBM_CCSID environment
|
|
variable.</dd>
|
|
|
|
<dt><strong>-c</strong></dt>
|
|
|
|
<dd>Do not create <em>file</em> if it does not exist. The <strong>touch</strong> utility
|
|
does not treat this as an error. No error messages are displayed
|
|
and the exit value is not affected.</dd>
|
|
|
|
<dt><strong>-f</strong></dt>
|
|
|
|
<dd>Attempt to force the update, even if the file permissions do
|
|
not currently permit it.</dd>
|
|
|
|
<dt><strong>-m</strong></dt>
|
|
|
|
<dd>Change the modification time of <em>file</em>. The access time of
|
|
the file is not changed unless the <strong>-a</strong> flag is also
|
|
specified.</dd>
|
|
|
|
<dt><strong>-r</strong> <em>ref_file</em></dt>
|
|
|
|
<dd>Use the access and modifications times from the specified <em>
|
|
ref_file</em> instead of the current time of day.</dd>
|
|
|
|
<dt><strong>-t</strong></dt>
|
|
|
|
<dd>Change the access and modification times to the specified time.
|
|
The argument should be in the form:
|
|
|
|
<pre>
|
|
[[CC]YY]MMDDhhmm[.SS]
|
|
</pre>
|
|
|
|
where each pair of letters represents the following:
|
|
|
|
<dl>
|
|
<dt><strong>CC</strong></dt>
|
|
|
|
<dd>The first two digits of the year (the century).</dd>
|
|
|
|
<dt><strong>YY</strong></dt>
|
|
|
|
<dd>The second two digits of the year. If YY is specified, but CC
|
|
is not, a value for CC between 69 and 99 results in a YY value of
|
|
19. Otherwise, a CC value of 20 is used.</dd>
|
|
|
|
<dt><strong>MM</strong></dt>
|
|
|
|
<dd>The month of the year, from 1 to 12.</dd>
|
|
|
|
<dt><strong>DD</strong></dt>
|
|
|
|
<dd>The day of the month, from 1 to 31.</dd>
|
|
|
|
<dt><strong>hh</strong></dt>
|
|
|
|
<dd>The hour of the day, from 0 to 23.</dd>
|
|
|
|
<dt><strong>mm</strong></dt>
|
|
|
|
<dd>The minute of the hour, from 0 to 59.</dd>
|
|
|
|
<dt><strong>SS</strong></dt>
|
|
|
|
<dd>The second of the minute, from 0 to 59.</dd>
|
|
</dl>
|
|
|
|
<p>If the CC and YY letter pairs are not specified, the values
|
|
default to the current year. If the SS letter pair is not
|
|
specified, the value defaults to 0.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<p><strong>Environment Variables</strong></p>
|
|
|
|
<p><strong>touch</strong> is affected by the following environment
|
|
variables:</p>
|
|
|
|
<dl>
|
|
<dt><strong>QIBM_CCSID</strong></dt>
|
|
|
|
<dd>If <em>file</em> does not exist, <strong>touch</strong> creates the file with the CCSID specified by
|
|
the value of the environment variable.</dd>
|
|
</dl>
|
|
|
|
|
|
<p><strong>Exit Status</strong></p>
|
|
|
|
<ul>
|
|
<li>0 on success</li>
|
|
|
|
<li>>0 if an error occurs</li>
|
|
</ul>
|
|
|
|
<strong>Examples</strong>
|
|
|
|
<ol>
|
|
<li>Change the time-date stamp of the file myfile to match the
|
|
time-date stamp of the file yourfile.
|
|
|
|
<pre>
|
|
touch -r yourfile myfile
|
|
</pre>
|
|
</li>
|
|
|
|
<li>Change the time-date stamp of the file myfile to a specific
|
|
time-date stamp.
|
|
|
|
<pre>
|
|
touch -t 200001010000.00 myfile
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
|
|
<!-- end ibmbody========================================================= -->
|
|
</body>
|
|
</html>
|
|
|