例如:
[root@ip-10-0-7-125 ~]# history | grep free
594 free -m
634 free -m | xargs | awk '{print "free/total memory" $17 " / " $ 8}'
635 free -m
636 free -m | xargs | awk '{print "free/total memory" $9 " / " $ 10}'
736 df -h | xargs | awk '{print "free/total disk: " $11 " / " $9}'
740 df -h | xargs | awk '{print "free/total disk: " $11 " / " $8}'
741 free -m | xargs | awk '{print "free/total memory: " $17 " / " $8 " MB"}'
我只是想知道是否有任何方法可以执行636命令而无需再次键入它,只需键入一些内容加上数字,例如历史记录636之类的内容。
ctrl-r
吗?