Record Your Terminal In a File

Record Your Terminal In a File

Today, I found one interesting command that could record everything in a file. Here’s the demonstration of “script” command.
Step 1:
Start script command and record every thing in “record” file.
saggi@saggi-A6200:~/Desktop$ script -a record
Script started, file is record
Now, do whatever you do in command and see the beauty of “script” command. See demo below:

saggi@saggi-A6200:~/Desktop$ uname -a
Linux saggi-A6200 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

saggi@saggi-A6200:~/Desktop$ touch saggi

saggi@saggi-A6200:~/Desktop$ ls
a.out Line.cpp~ shape.cpp~
check link test
check~ link~ testfile
checkthisout Metasploit And Backtrack Videos testfile.txt.save
construct.cpp password crack tips
construct.cpp~ pksirlab2.pdf to
demo_file question to~
diamond.cpp record Untitled Folder
diamond.cpp~ saggi virtu.cpp
Line.cpp shape.cpp virtu.cpp~

saggi@saggi-A6200:~/Desktop$ clear

saggi@saggi-A6200:~/Desktop$ uptime
21:04:52 up 1:10, 2 users, load average: 0.57, 0.51, 0.44

saggi@saggi-A6200:~/Desktop$ exit
exit
Script done, file is record

(Now open the file record. You’ll see all the command and result recorded in record file.)

Leave a Reply

Your email address will not be published. Required fields are marked *