I accidentally cleared my screen and I need to see my previous output, any way to see output/results of previous commands? I understand that I can see my past commands using history command but I am not looking for that
Asked
Active
Viewed 8,276 times
8
1 Answers
2
You can use !!
. This command prints the output of the last command you ran.
For example:
me@dev:~$ cat test.txt
This is the test file.
And i cleared my screen.. Then i ran the !!
command. And output is here:
me@dev:~$ !!
cat test.txt
This is the test file.
Look here for more..
NOTE: You shouldn't use clear
while clean your screen, instead you should use Ctrl+L because terminal remembers clear
as the last command.

myrn
- 31
- 4
clear
? Please [edit] your question and explain what you need in more detail. – terdon Dec 20 '19 at 09:04