コマンドの実行履歴を確認する
コマンドの実行履歴を確認するには、history コマンドを使用します。
履歴番号とコマンドが合わせて出力されます。
なお、コマンドの実行履歴をすべて消去する場合は、オプション -c を使用します。
◆コマンドの履歴を確認
# history 1 shutdown -h now 2 vi /etc/fstab 3 vi /etc/fstab 4 shutdown -h now 5 df
◆コマンドの履歴をすべて消去
# history -c
[対象]
CentOS 5.x
CentOS 6.x