number1killer的博客

I'm possible.

文章管理 linux命令嵌套实例(二)

上次说了一下linux文件操作的命令嵌套,这次来补充一点内容。

1、!号的使用。例如:

 cat /home/i/桌面/apache-tomcat-9/logs/localhost_access_log.2017-08-22.txt  | grep [!3]
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:25 +0800] "GET /tomcat.css HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:25 +0800] "GET /tomcat.png HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:26 +0800] "GET /favicon.ico HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:26 +0800] "GET /asf-logo-wide.svg HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:26 +0800] "GET /bg-upper.png HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:26 +0800] "GET /bg-nav.png HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:26 +0800] "GET /bg-middle.png HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:16:55:26 +0800] "GET /bg-button.png HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:17:21:24 +0800] "GET /docs/images/fix.gif HTTP/1.1" 200 345
0:0:0:0:0:0:0:1 - - [22/Aug/2017:17:21:24 +0800] "GET /docs/images/add.gif HTTP/1.1" 200 1037
0:0:0:0:0:0:0:1 - - [22/Aug/2017:17:21:24 +0800] "GET /docs/images/code.gif HTTP/1.1" 200 394
0:0:0:0:0:0:0:1 - - [22/Aug/2017:17:21:24 +0800] "GET /docs/images/tomcat.gif HTTP/1.1" 304 -
0:0:0:0:0:0:0:1 - - [22/Aug/2017:17:21:25 +0800] "GET /docs/images/asf-logo.svg HTTP/1.1" 304

2、*号的使用。例如:

[root@localhost bin]# ls -all | find  *j*
bootstrap.jar
commons-daemon.jar
tomcat-juli.jar


阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/number1killer/article/details/77603370
个人分类: linux,命令
所属专栏: linux
上一篇linux命令嵌套实例(一)
下一篇linux命令嵌套实例(三)
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭