The history commands in Linux are generally saved in the user???? /root/.bash_history
History Options Historical Command Save folder
Options
???? -C: Empty history command
???? -W: Write History command in cache to history command to save file/root/.bash_history
The commands you see in. bash_history are not exactly the same as what you see with the history command. What you see in the. bash_history file is the command that was saved after the last logon logoff, and the command that Histroy saw that included this login execution
1. Write the command in the cache to the history command to save the file
[Email protected] ~]# history-w
2. Clear historical order
[Email protected] ~]# history–c
3. The history command has to be called
???? Use the up and down arrows to invoke previous history commands
???? Use! N Repeating nth History command
???? Use!! Repeat the previous command
Use! Character to re-execute the last command that starts with the string
?
History commands in Linux