1 history
The history command lists used commands. the user's history command is stored in the. bash_history file in the user's home directory.
491 sync 492 logout 493 go-m3 494 logout 495 go-m3 496 go_m3 497 ll 498 ll bin/499 go-m3
Run the 495 command again:>! 495
Obtain the relevant parameters in the previous command: Command "! : N "indicates obtaining the nth parameter in the previous command, where! Prompt shell to obtain a parameter in the previous command. $ indicates the last parameter.
"^" Indicates replacement, for example,> ^ CD ^ CP indicates replacing the CD in the previous command with CP
Repeat the last command> !!
2. quickly return to the directory before CD
The variable oldpwd saves the directory path before the last command to use CD, so you can use the CD $ oldpwd command to quickly return to the directory before CD.