Command History & Substitution
Command History
history
history
865 find / -name 'file1.txt' 2> errors.txt
866 cat errors.txt
867 ll
868 ls errors.txt
869 ll errors.txt
870 source .bashrc
871 ll errors.txt
872 ls -lah errors.txt
# It includes the executed commands and the history number associated to them
history | less
# To execute one of the previous commands use !HISTORY_NUMBER
!868
# To execute the last command use these shortcuts
!-1
!!
# Up & Down arrow keys can be used to scroll through history
# To execute the last "command" command - cat for example
!catCommand Substitution
Last updated