Script - Linux Command To Make Your Records

Script - Linux Command To Make Your Records

Making your own command documentation

While implementing various commands in the Shell, sometimes you want to record your whole process of implementation so that in the future you can use this when needed. Now, many of you can think Linux has a command to review your history so why do we need to have this script command?

So, the Terminal record your history until your terminal is in the working stage or implementation is taking place how would you get that history when your system is refreshed by your day-to-day operation of switching off?

So the solution to the above is you can record your whole procedure of implementation just by using the Script command.

By using the above command you can just start the process of recording your implementation in the shell. By default, if you don't specify any file type then it will take typescript as the file to store your whole process. You can implement this with your personal choice of file by implementing this command.

Just typing the name of the file after the script command makes your whole recording stored in that file. Now you can perform all the commands that you want to implement and also wish to record for future reference.

While like above I perform my implementation on the shell and record this whole content in my demo.log file like this you can also perform it.

If you want to exit the script command you can do this by just typing exit in shell and on the other hand you can exit by just using CTRL+D. This will make you exit/quit the script command.

Now, In the future, if you want your implementation to be viewed you can do this by just using viewing the demo.log file on the terminal.

By using the cat command, I can see the whole implementation that I wanted to be recorded. So that in the future I can take it's a reference when I am in a problem. you can relate it with the documentation in the form of the records prepared by you.

You can also record the response of a specific command that you think is important and you can have its need on the regular basis.

In this way, you can make records of the implementation that you are performing on the shell and take a view when you are in the problem. In this, you can make your documentation of commands.

I hope you enjoyed reading this and that you have learned something new that you can perform in the future to make your life easy.