2total entries in linux
Redirecting streams to the /dev/null sink
Syntax
<operation> [n]> /dev/null [options] |
Option | Description |
---|---|
operation | The operation whose output will be redirected. |
n | The stream to be redirected (see below). |
options | The stream redirection options. |
Valid values for [n]: 1, standard out 2, standard error &, both
Using the bang command (!)
Syntax
!<option>[:p] |
Option | Description |
---|---|
! | Use the last command |
[n] | Use the n-th unique command in the history |
-[n] | Use the command n-th lines back in the history (can be repeated commands) |
[str] | Use the most recent command that starts with the given string |
?[str] | Use the most recent command that contains the given string |
:0 | Use the previous command with no arguments |
^ | Use the first word of the previous command |
:[n] | Use the n-th word of the previous command |
$ | Use the last word of the previous command |
* | Use the all words of the previous command |
:p | Prints the matching command without executing it |