tronicbta.blogg.se

History of redhat linux
History of redhat linux












  • Press Control+P will display the previous command, press enter to execute itĤ.
  • Type !-1 and press enter from the command line.
  • Type !! and press enter from the command line.
  • Use the up arrow to view the previous command and press enter to execute it.
  • Following are the 4 different ways to repeat the last executed command. Sometime you may end up repeating the previous commands for various reasons. Repeat previous command quickly using 4 different methods (reverse-i-search)` httpd': service httpd stop you can search for httpd, which will display service httpd stop from the command history, select this command and change the stop to start and re-execute it again as shown below. Sometimes you want to edit a command from history before executing it. Which will execute the command from the history]

    history of redhat linux

    [Note: Press enter when you see your command, (reverse-i-search)` red': cat /etc/redhat-release Which will display the reverse-i-search prompt] In the following example, I searched for red, which displayed the previous command “ cat /etc/redhat-release” in the history that contained the word red. When you’ve already executed a very long command, you can simply search history using a keyword and re-execute the same command without having to type it fully. I strongly believe, this may be your most frequently used feature of history.

    history of redhat linux history of redhat linux

    # export HISTTIMEFORMAT='%F %T 'Ĥ 19:02:39 cat /etc/redhat-release 2. For auditing purpose, it may be beneficial to display the timepstamp along with the command as shown below. Typically when you type history from command line, it displays the command# and the command. In fact, once you have mastered the 15 examples that I’ve provided here, you’ll find using command line more enjoyable and fun.ġ. When you are using Linux command line frequently, using the history effectively can be a major productivity boost.














    History of redhat linux