Javatpoint Logo
Javatpoint Logo

Linux !!

This command is also pronounced as 'bang bang' command. It repeats the last typed command in your shell.


Linux Bang Bang1

Look t the above snapshot, 'ls' command is repeated by passing '!!' command. After that, 'echo command will be repeated' has also repeated.


This command is pronounced as one bang. Last typed command will be repeated by '!!'. But, if you want to repeat other commands then you can use '!' command followed by one or more characters of that command.


Linux Bang Bang2

Look at the above snapshot, command "!fi" repeats the above command 'file office'.


Here, n denotes a number. Just type '!' followed by the command line number you want to use and that command will be executed.



Linux Bang Bang3

Look at the above snapshot, we have executed command 'ls' from the line number 1043.

Next TopicLinux Networking

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA