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

HTML table_Powernode Java Academy

To draw a table in HTML, use the table tag tr me...

MySQL can actually implement distributed locks

Preface In the previous article, I shared with yo...

Pure CSS to achieve left and right drag to change the layout size

Utilize the browser's non- overflow:auto elem...

10 Website Usability Tips Everyone Should Know

Let’s not waste any more time and get straight to...

WeChat applet implements a simple calculator

A simple calculator written in WeChat applet for ...

CSS to achieve the small sharp corner effect of bubbles

Effect picture (the border color is too light, pu...

Docker practice: Python application containerization

1. Introduction Containers use a sandbox mechanis...

Operate on two columns of data as new columns in sql

As shown below: select a1,a2,a1+a2 a,a1*a2 b,a1*1...

CSS screen size adaptive implementation example

To achieve CSS screen size adaptation, we must fi...

How to create a Django project + connect to MySQL

1: django-admin.py startproject project name 2: c...

React event binding details

Table of contents Class component event binding F...

A detailed analysis and processing of MySQL alarms

Recently, a service has an alarm, which has made ...

How to implement nested if method in nginx

Nginx does not support nested if statements, nor ...

ReactHooks batch update state and get route parameters example analysis

Table of contents 1. How to update in batches Con...

Detailed explanation of nginx request header data reading process

In the previous article, we explained how nginx r...