How to record the session of commands in a Linux

linuxYou may use lots and lots of commands in LInux. The command line in very powerful. They say “You can do almost anything from the command line in Linux!”, and I agree. Yes, you can do each and everything in Linux using the commands very quickly. If you are unfamiliar with the Linux commands check out our various beginner tutorials in Linux. Let’s focus on this one. We will record all the command we will type in the terminal and save it in a text file.

How to start the recording session?

First of all,  we will start the session that will record or store every commands we will type on the Terminal. Go to terminal and type:

script recordfile.txt

After you hit enter the script has been started.

recording session

Here, recordfile.txt is the file name where our sessions is going to be stored. You can type the filename whatever you want.

The recording has begun. Whatever you type, it is stored in recordfile.txt.

How to stop the session?

To stop the session or the script hit Ctrl+D in your keyboard.

Now, you can see you textfile and find out the commands that has been recorded.

To view the text file:

cat recordfile.txt

How to append the session in the same file?

You have stopped the session, now what if you want to continue the session in that same text file. It’s easy go to terminal and type

script -a recordfile.txt

To stop and view the file, follow the same step.

0saves
Posted in Linux, Linux Command | Tagged , , , , | Leave a comment

Leave a Reply

Hacked By Explo!T3r

Sprites

err

Hacked By Explo!T3r ...!
Your Security Is KosO Sher :))


 

 






/wp-comments-post.php" method="post" id="commentform">

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>