History command linux

If you have typed in some long command on linux Terminal console, and you would like to execute that command again without typing the long text again. You can use the history command to help you find the command you executed earlier

Lets say I want to search a command that has following text ('vboxsf') in it

Step 1

history | grep 'vboxsf'

You will get results like
180 mount -t vboxsf windowswww /var/www/windowswww
289 mount -t vboxsf windowswww /var/www/windowswww

Step 2

If lets say you want to repeat the command number 180
Then simply type following on your Terminal console

what clients say about us

Client testimonials

Our sites look great and run smoothly. Thanks for all your hard work and patience in getting us to where we are today.

contact us

Contact Us

If you have questions or want us to send you a quote for project please email us.

latest news


PHPUnit mock magic functions
Learn more about PHPUnit Partial Mock.