0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Linux date コマンド例

Last updated at Posted at 2025-12-09

Linuxのdateコマンドの主なパラメータと使い方を例付きで解説。日付・時刻・曜日・タイムゾーンの表示や日付計算、月の最初・最後の日の取得方法まで、実務で役立つ具体例を紹介します。

動作確認済環境
Ubuntu 22, Oracle Linux 8

1. 主なパラメータ

パラメータ 意味
%F 日付(フル)、%Y-%m-%dと同じ 2023-10-01
%D 日付(簡略)、%m/%d/%yと同じ 10/01/23
%Y 年(4桁) 2023
%y 年(2桁) 23
%m 01~12
%d 01~31
%H 00~23
%M 00~59
%S 00~60
%T 時刻、%H:%M:%Sと同じ 13:50:20
%A 曜日(フル) Sunday
%a 曜日(簡略) Sun
%Z アルファベットのタイムゾーンの略称 JST
%:z +hh:mm 数値タイムゾーン +09:00

リンクから、詳細をご確認いただけます。


関連記事
クラウド技術ブログ一覧

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?