LoginSignup
3
1

More than 5 years have passed since last update.

historyコマンドに年月日時分秒を表示する

Posted at

サーバ構築時に1度しか設定せずいつも調べてるので書いておきます。
今回は「年/月/日 時(24):分:秒 実行コマンド」の形で出力する。

$ vi .bash_profile 
HISTTIMEFORMAT="%Y/%m/%d %0H:%0M:%0S "
$ source .bash_profile
$ history
  XXX  2018/03/21 19:25:41 history
3
1
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
3
1