JITAKU_SVR_Wiki
historyをカスタマイズすることで、自分のコマンドが後から確認しやすくなる。
コマンドにタイムスタンプをつける †
# vim .bash_profile
export HISTTIMEFORMAT='%Y/%m/%d %T ';
# history
995 2013/06/18 17:40:28 ls
996 2013/06/18 17:40:29 history
997 2013/06/18 17:40:39 ls
998 2013/06/18 17:40:41 history
999 2013/06/18 17:40:51 cd
1000 2013/06/18 17:40:57 vim .bash_profile
1001 2013/06/18 17:41:14 history
1002 2013/06/18 17:42:18 vim .bash_profile
1003 2013/06/18 20:05:26 history
historyのサイズを変更する †
デフォルトだと1000行までしか保存してくれないので、10000に変更。
# vim .bash_profile
export HISTSIZE=10000
# history
1009 2013/06/18 20:08:39 w
1010 2013/06/18 20:08:42 history
1011 2013/06/18 20:08:46 w
1012 2013/06/18 20:08:47 ls
1013 2013/06/18 20:08:48 w
1014 2013/06/18 20:08:48 ls
1015 2013/06/18 20:08:50 w
1016 2013/06/18 20:08:50 ls
1017 2013/06/18 20:08:50 w
1018 2013/06/18 20:08:51 ls
1019 2013/06/18 20:08:51 w
1020 2013/06/18 20:08:52 ls
1021 2013/06/18 20:08:52 w
1022 2013/06/18 20:08:53 ls
1023 2013/06/18 20:08:54 history