Open jbeadling opened 1 year ago
The history command is used to display a list of previously executed commands in the current shell session. You can simple hit the up arrow to go through previously entered commands one by one. You can also type history and it will display all the commands you used previously, note the amount of history stored can be changed in your config file.
The !! command is a shortcut that represents the last command you executed in your shell session. It allows you to quickly rerun the previous command without typing it out again.
the !$ command represents the last argument of the previous command. It's useful when you want to reuse the last argument of a command in a new commands.
Summary
Learn how to effectively use the command history features in your shell for more efficient command-line operations. Topics will cover commands like
history
,!!
,!$
, and the use of the arrow keys to navigate through the command history.Description
Objective: Gain expertise in utilizing command history for quicker and more efficient command execution, debugging, and scripting.
Scope:
Learning Tasks
Overview of Command History:
Navigating Through History:
history
command to navigate through previously used commands.Reusing and Modifying Past Commands:
!!
,!$
, and other shortcuts to quickly reuse or modify past commands for current tasks.Hands-on Practice:
!!
.!$
.history
command to display a list of your command history, then execute a command from that list.Troubleshooting:
Learning Goals
Priority