现在的位置: 首页 > 综合 > 正文

bash 调用历史命令

2019年08月03日 ⁄ 综合 ⁄ 共 394字 ⁄ 字号 评论关闭

1.  ctrl+r  搜索历史,匹配后直接回车执行

2. !+历史命令号
先用history查看历史命令号,然后!执行
如:
#history
1342  ls
 1343  ll
 1344  ./optch
 1345  ./opatch
 1346  ./opatch version
 1347  ./opatch isinventory
 1348  ./opatch
 1349  ./opatch lsinventory
 1350  emca -h |less
 1351  emca  -displayconfig  dbcontrol
 1352  emca -displayConfig dbcontrol 
 1353  emca -displayConfig dbcontrol  -h
 1354  emca -displayConfig dbcontrol  -h|less
 1355  history
 1356  opatch -version
#!1350

抱歉!评论已关闭.