Javatpoint Logo
Javatpoint Logo

Linux !!

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

Syntax:

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.

Syntax:

Linux Bang Bang2

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


!n

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

Syntax:

Example:

Linux Bang Bang3

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

Next Topic#




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA