Home Linux How to find the last 10 command that you used on the command line in Linux?
 
 
 

How to find the last 10 command that you used on the command line in Linux?

PDF Print E-mail

Question: How to find the last 10 commands that you used on the command line in Linux?

 

Answer: 

  • Type in the following command in the CLI
    history | tail -n 10
  • This command will list the last 10 command line commands that you used.
  • Example

      506  history n
      507  history | tail 
      508  history | tail -10
      509  history | tail -n 3
      510  pgrep skype
      511  pgrep phone
      512  grep -rni 'test' *.php
      513  cd /var/www/test/
      514  grep -rni 'test' *.php
      515  history | tail -n 10
    
+/-
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!