Usage: touch [OPTION]... FILE...
Update the access and modification times of each FILE to the current time.
A FILE argument that does not exist is created empty, unless -c or -h
is supplied.
A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.
長いオプションに必須の引数は短いオプションにも必須です.
-a change only the access time
-c, --no-create do not create any files
-d, --date=STRING parse STRING and use it instead of current time
-f (ignored)
-h, --no-dereference affect each symbolic link instead of any referenced
file (useful only on systems that can change the
timestamps of a symlink)
-m change only the modification time
-r, --reference=FILE use this file's times instead of current time
-t STAMP use [[CC]YY]MMDDhhmm[.ss] instead of current time
--time=WORD change the specified time:
WORD is access, atime, or use: equivalent to -a
WORD is modify or mtime: equivalent to -m
--help この使い方を表示して終了
--version バージョン情報を表示して終了
Note that the -d and -t options accept different time-date formats.
Report touch bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: touch [OPTION]... FILE...
Update the access and modification times of each FILE to the current time.
A FILE argument that does not exist is created empty, unless -c or -h
is supplied.
A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.
Mandatory arguments to long options are mandatory for short options too.
-a change only the access time
-c, --no-create do not create any files
-d, --date=STRING parse STRING and use it instead of current time
-f (ignored)
-h, --no-dereference affect each symbolic link instead of any referenced
file (useful only on systems that can change the
timestamps of a symlink)
-m change only the modification time
-r, --reference=FILE use this file's times instead of current time
-t STAMP use [[CC]YY]MMDDhhmm[.ss] instead of current time
--time=WORD change the specified time:
WORD is access, atime, or use: equivalent to -a
WORD is modify or mtime: equivalent to -m
--help display this help and exit
--version output version information and exit
Note that the -d and -t options accept different time-date formats.
Report touch bugs to bug-coreutils@gnu.org
GNU coreutils home page:
TOUCH(1) TOUCH(1) 名前 touch - ファイルのアクセス時刻と修正時刻を変更する 書式 touch [-acm][-r ref_file|-t time] file... 今後使われなくなる書式: touch [-acm][ugly_time] file... GNU 版: touch [-acfm] [-r file] [-t time] [-d time] [--time={atime,access,use,mtime,modify}] [--date=time] [--refer- ence=file] [--no-create] [--help] [--version] [--] file... 説明 touch コマンドは指定したそれぞれの file のアクセス時刻、修正時刻または いずれかを変更する。 特に指定がない場合は現在時刻に変更する。 -r オプションを使った 場 合 、 ref_file の時刻を使い変更し、-t オプションを使った場合には time で指定 した時刻に変更する。 -a と -m オプションのいずれも指定しないか、同時に指定すると両方の時刻 ( 訳 注:アクセス時刻と修正時刻) を変更する。 -a と -m オプションのいずれ か 1 つを指定すると、アクセス時刻もしくは修正時刻のいずれかのみを変更す る。ファイルがまだ存在しない場合は、-c オプションが指定されていない限り 、 (モード 0666 を umask で修正したアクセス権にして、空のファイルを) 作 成する。 POSIX オプション -a file のアクセス時刻のみを変更する。 -c file を作成しない。 -m file の修正時刻を変更する。 -r ref_file ref_file で指定したファイルの時刻を使い変更する。 -t time time で指定した時刻を使い変更する。引き数は次のような明確な意味 を持つ 10 進数の形式で指定する。 [[CC]YY]MMDDhhmm[.SS] CC を指定しない場合、年 CCYY は 1969-2068 の範囲となる ( 訳 注: YY=69-99 の場合 CC=19、YY=00-68 の場合 CC=20 と見做される)。 YY を指定しない場合には、現在の年が使われる。 SS を指定しない 場 合 、0 として見做される。うるう秒を参照できるように 0-61 の範囲で指 定できる。結果の時刻は環境変数 TZ により指定されたタイムゾーンで の時刻となる。結果の時刻が 1970 年 1 月 1 日以前になった場合、エ ラーとなる。 POSIX 詳細 2 つ目の形式では ugly_time が時刻なのかファイルを指定する引き数なのかは っ きりしないという不利な面がある。 -r もしくは -t オプションを指定せず 、少なくても 2 つの引き数を指定し、最初の引き数が 8 桁もしくは 10 桁 の 10 進数である場合には時刻として見做す。 ugly_time の書式は MMDDhhmm[yy] で、 yy は 69-99 の範囲で指定し 1969 年から 1999 年 を表す。 yy が指 定 されない場合は現在の年を表す。 こ の書式は今後使われない。現在では touch は、オプションのない 8 桁また は 10 桁の数字の引き数を、 ’MMDDhhmm[YY]’ という書式の日付ではなく、 フ ァイル名として認識する。 GNU 詳細 最 初の file が -t に対する有効な引き数で、かつ -d, -r オプションで時刻 を指定していない場合、または -t オプションと ‘--’ オプションが指定さ れ て いない場合、その引き数はファイル名としてではなく、その他のファイルの 時刻として解釈される。 touch コマンドでファイルのアクセス時間や修正時間を現在時刻に変更する 場 合 、実行するユーザーはファイルの所有者でなくても、そのファイルに対する 書き込みアクセス権があれば良い。そうでない場合には、そのファイルの所 有 者である必要がある。 GNU オプション -a, --time=atime, --time=access, --time=use アクセス時刻のみ変更する。 -c, --no-create 指定したファイルが存在しない場合、作成しない。 -d, --date=time 現在時刻の代わりに、 time で指定した時刻を使う。月の名前や、タイ ムゾーン、‘am’ や ‘pm’、等を含めることができる。 -f 無視される; BSD 版の touch(1) との互換性のために用意されている。 -m, --time=mtime, --time=modify 修正時刻のみを変更する。 -r file, --reference=file 現在時刻の代わりに、参照用に指定した file の時刻を使う。 GNU 標準オプション --help 標準出力に使用方法のメッセージを出力して正常終了する。 --version 標準出力にバージョン情報を出力して正常終了する。 -- オプションリストを終了する。 環境変数 変 数 TZ が 明示的に与えられた時刻を解釈するのに使われる。変数 LANG, LC_ALL, LC_CTYPE, LC_MESSAGES が通常の意味を持つ。 準拠 POSIX 1003.2 では -t オプションの引き数の書式が GNU での実装で使われ て いるものとは違っている。 注意 こ のページでは fileutils-4.1 パッケージでの touch コマンドについて説明 している。その他のバージョンでは少し違いがあるかもしれない。修正や追 加 は aeb@cwi.nl, aw@mail1.bet1.puv.fi, ragnar@ragnar-hojland.com 宛てにメ ールで連絡してほしい。プログラムのバグについては bug-fileutils@gnu.org へ報告してほしい。 GNU fileutils 4.1 18 June 2002 TOUCH(1)
TOUCH(1) User Commands TOUCH(1)
NAME
touch - change file timestamps
SYNOPSIS
touch [OPTION]... FILE...
DESCRIPTION
Update the access and modification times of each FILE to the current
time.
A FILE argument that does not exist is created empty, unless -c or -h
is supplied.
A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.
Mandatory arguments to long options are mandatory for short options
too.
-a change only the access time
-c, --no-create
do not create any files
-d, --date=STRING
parse STRING and use it instead of current time
-f (ignored)
-h, --no-dereference
affect each symbolic link instead of any referenced file (useful
only on systems that can change the timestamps of a symlink)
-m change only the modification time
-r, --reference=FILE
use this file’s times instead of current time
-t STAMP
use [[CC]YY]MMDDhhmm[.ss] instead of current time
--time=WORD
change the specified time: WORD is access, atime, or use: equiv-
alent to -a WORD is modify or mtime: equivalent to -m
--help display this help and exit
--version
output version information and exit
Note that the -d and -t options accept different time-date formats.
DATE STRING
The --date=STRING is a mostly free format human readable date string
such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or
even "next Thursday". A date string may contain items indicating cal-
endar date, time of day, time zone, day of week, relative time, rela-
tive date, and numbers. An empty string indicates the beginning of the
day. The date string format is more complex than is easily documented
here but is fully described in the info documentation.
AUTHOR
Written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie,
and Randy Smith.
REPORTING BUGS
Report touch bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa