Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to run a command from history linux

##To run a specific command from your history by its number, use the following command:
!#

##Example to run command number 12 from history list enter below command
## Replace the number with ur required command from bash history.
!12

## To just display what exact command would be executed without actually executing it
!12:p

Source by www.howtogeek.com #
 
PREVIOUS NEXT
Tagged: #run #command #history #linux
ADD COMMENT
Topic
Name
6+6 =