5/01/2016

How to see the commands executed most recently

When we are configuring something through command prompt, we may want to know what we have done or  up to what level we have gone so far. There is a specific way you can see them. 

The history command displays the list of previously executed commands. Each has a reference number that is just a number in the sequence in which it invoked.


after typing history command, the output will be like this.



Another point here is you can call a command by a reference number without typing the actual command. call ls | wc - l > a.txt by a number 863. You must put ! mark in front of the reference number.


Now you see the command is called by a number.

Summary

1. history is used to list commands executed recently.
2. Can call a command from the list by the reference number !number
tags: commands executed most recently, history,  linux, ubuntu, fedora, redhat, rhcsa, system admin, engineer, programing, cd, india

No comments:

Post a Comment