How to view and execute historical commands in Linux

How to view and execute historical commands in Linux

View historical commands and execute specified commands

owen@owen:~/owen/software/nginx-1.10.1$ history | grep 'configure'
1083 ./configure 
1109 ./configure --prefix=/usr/nginx
1110 ./configure --prefix=/usr/nginx
2058 ./configure --prefix=/usr/local/nginx --with-openssl=/home/owen/owen/software/openssl-1.0.2m --with-http_ssl_module --add-dynamic-module=/home/owen/owen/project/src/ngx_my_test_study
2064 history | grep configure 

owen@owen:~/owen/software/nginx-1.10.1$ !2058
./configure --prefix=/usr/local/nginx --with-openssl=/home/owen/owen/software/openssl-1.0.2m --with-http_ssl_module --add-dynamic-module=/home/owen/owen/project/src/ngx_my_test_study

The above article about how to view historical commands and execute them in Linux is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • Teach you to hide Linux command line history
  • Shell history command recording function in Linux
  • How to Communicate with Other Users on the Linux Command Line
  • There is no make command in Linux (make: *** No target specified and no makefile or make command installation method found)
  • Use of Linux telnet command
  • Linux gzip command compression file implementation principle and code examples
  • Detailed explanation of how to adjust Linux command history

<<:  An Incomplete Guide to JavaScript Toolchain

>>:  Tips for importing csv, excel or sql files into MySQL

Recommend

Example of JSON output in HTML format (test interface)

To display the JSON data in a beautiful indented ...

Import CSS files using judgment conditions

Solution 1: Use conditional import in HTML docume...

A brief discussion on the use and analysis of nofollow tags

Controversy over nofollow There was a dispute bet...

About Nginx gzip configuration

The principle of nginx to achieve resource compre...

Solution to 1045 error when navicat connects to mysql

When connecting to the local database, navicat fo...

Solution to "Specialized key was too long" in MySQL

Table of contents Solution 1 Solution 2 When crea...

Use of Linux network configuration tools

This article introduces RHEL8 network services an...

UDP connection object principle analysis and usage examples

I wrote a simple UDP server and client example be...

How to show or hide common icons on the desktop in Windows Server 2012

Windows Server 2012 and Windows Server 2008 diffe...

Ten important questions for learning the basics of Javascript

Table of contents 1. What is Javascript? 2. What ...

Detailed explanation of common methods of JavaScript String

Table of contents 1. charAt grammar parameter ind...

jQuery+Ajax to achieve simple paging effect

This article shares the specific code of jquery+A...

How to use CSS attribute selectors to splice HTML DNA

CSS attribute selectors are amazing. They can hel...