!string
Refer to the most recent command starting with string.
!?string[?]
Refer to the most recent command containingstring.The trailing ? may be omitted ifstringis followed immediately by a newline.这个是什么?其实呢想一想通常的 !2019,!-4:3-5 等等等等, !string 和 !?string? 的用处就是在你不愿意去数命令的时候,可以使用所包含的特征字符串来定位历史命令。
- [root@tivg05 OSAgent]# bin/itmcmd agent -o tivg05 stop m6
- bin/itmcmd agent -o tivg05 stop m6
- Stopping ... Manager Agent for ...
- Product ... Manager Agent for ... was stopped gracefully.
- Agent stopped...
- [root@tivg05 OSAgent]# bin/cinfo -r
- bin/cinfo -r
- *********** Tue Sep 14 12:30:21 EDT 2010 ******************
- User: root Groups: root bin daemon sys adm disk wheel mqm
- Host name : tivg05 Installer Lvl:06.22.02.00
- CandleHome: /opt/IBM/OSAgent
- ***********************************************************
- Host Prod PID Owner Start ID ..Status
- tivg05 lz 1473 root Sep02 None ...running
- tivg05 m6 16210 root 11:41 hpi03 ...running
- [root@tivg05 OSAgent]# !?itmcmd?:s/tivg05/hpi03/
- !?itmcmd?:s/tivg05/hpi03/
- bin/itmcmd agent -o hpi03 stop m6
- Stopping ... Manager Agent for ...
- Product ... Manager Agent for ... was stopped gracefully.
- Agent stopped...
- [root@tivg05 OSAgent]#
复制代码 |