historyコマンド
スポンサードリンク
【説明】
過去に実行したコマンド一覧を表示する際に使用します。
ディストリビューションにもよりますが、「!!」で直前のコマンド再実行出来たり、「!」+行番号で指定のコマンドを実行することが可能です。historyコマンドを表示するためのファイルは変数「HISTFILE」で指定されています。
【構文】
history [オプション] [ファイル]
例 過去の実行コマンドを表示します。
[root@localhost test]# history
1 ifconfig
2 ping 192.168.0.1
3 exit
4 cp -p test5 test6
5 cp -p test5 test6
・
・ |
|
|