Linuxコマンドリファレンス
Linuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス dateLinuxコマンドリファレンス date
コマンド名称 date 最終更新日 2008-08-31
コマンド機能 システムの日付と時刻を表示・設定する
機能概要 引数を指定しないと、現在の時刻と日付を表示する
コマンドの由来  
RPMパッケージ名 coreutils 対象バージョン 6.9
コマンド書式 date [-uR] [-d datestr] [-f datefile] [-r file] [-s datestr] [-I [time-spec]] [--date=datestr] [--file=datefile] [--iso-8601[=timespec]] [--reference=file] [--set=datestr] [--rfc-822] [--universal] [--utc] [+format] [MMDDhhmm[[CC]YY][.ss]]

date [--help] [--version]
オプション -d datestr, --date datestr
現 在の時刻・日付の代わりに、datestr で指定された時刻・日付を表示する。 datestr は普通のフォーマットならだいたいなんでも使うことができる。月名、タイムゾーン、am や pm なども用いてよい

-f datefile, --file=datefile
-d とともに指定された datefile を一行ずつパースして、結果の時刻と日付を表示する。 datefile が - の場合は標準入力が用いられる。これは、たくさんの日付を処理しなければならない場合に便利である。 date の実行ファイルを何回も起動するオーバーヘッドは無視できないからである

-r file, --reference=file
表示する時刻と日付を file の最終修正時刻にする

-s datestr, --set datestr
時刻と日付を datestr に設定する。上述の -d を見よ。成功すると 0を返し、失敗すると 0 以外を返す

-u, --universal, --utc
時刻と日付を地方時 (壁時計の時刻) ではなく協定世界時 (グリニッジ平均時) によって表示・設定する

-I [timespec], --iso-8601[=timespec]
日付を ISO 8601 で指定されている書式 %Y-%m-%d で、時刻を time-spec で指定されている形式で表示する (後者のデフォルトは auto)。時刻部分の表示には T が前置され、%z (--utc が指定されている場合には %Z) が後置される

auto
時刻を表示しない

hours
その日の時刻を表示する

minutes
時・分を表示する

seconds
時・分・秒を表示する

-R, --rfc-822
時刻と日付を RFC-822 で指定された書式である %a, %_d %b %Y %H:%M:%S %z で表示する。--utc が同時に指定されると、%z の代わりに GMT を用いる

--help
標準出力に使用方法のメッセージを出力して正常終了する

--version
標準出力にバージョン情報を出力して正常終了する
引数  
使用例  

戻る
Linuxコマンドリファレンス