標準bashのシェル(およびその構成)に依存するのは、コマンドのみが日付と時刻なしで保存されるためです(.bash_history
を確認してください) そこにタイムスタンプがある場合)。
タイムスタンプを bash に保存するには、HISTTIMEFORMAT
を設定する必要があります 以前 コマンドを実行します。 .bashrc
で または .bash_profile
.これにより、bash はタイムスタンプを .bash_history
に保存します。 (#
で始まるエントリを参照してください) ).
このリンクに関して、次のコマンドを実行することで、krzyk が提供する最初の解決策を永続的にすることができます:
echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile
source ~/.bash_profile
これを試してください:
> HISTTIMEFORMAT="%d/%m/%y %T "
> history
もちろん、好みに合わせてフォーマットを調整できます。
zsh を使用している場合は、たとえば -E
を使用できます または -i
スイッチ:
history -E
man zshoptions
を実行すると または man zshbuiltins
これらのスイッチの詳細や、歴史に関連するその他の情報を見つけることができます:
Also when listing,
-d prints timestamps for each event
-f prints full time-date stamps in the US `MM/DD/YY hh:mm' format
-E prints full time-date stamps in the European `dd.mm.yyyy hh:mm' format
-i prints full time-date stamps in ISO8601 `yyyy-mm-dd hh:mm' format
-t fmt prints time and date stamps in the given format; fmt is formatted with the strftime function with the zsh extensions described for the %D{string} prompt format in the section EXPANSION OF PROMPT SEQUENCES in zshmisc(1). The resulting formatted string must be no more than 256 characters or will not be printed
-D prints elapsed times; may be combined with one of the options above
systemd 経由で Python スクリプトを実行すると、モジュールのロードに失敗する
Linux 上の matlab は何もプロットできません (libstdc++.so.6 をロードできません:バージョン `CXXABI_1.3.8' が見つかりません)