123
history命令:列出之前输入的所有命令,后面常跟一些参数,例如 history 5,则是列出最近使用的5条命令
[root@xiaoluo ~]# history 5
1064 ifconfig eth0 172.25.215.31
1065 ifconfig
1066 ping 172.25.215.25
1067 history
1068 history 5
!命令 :执行指定序号的命令,例如:!1065 则会执行1065对应的那条命令 ifconfig(这个序号对应的是之前所输入命令的序号)
[root@xiaoluo ~]# !1065
ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:B2:10:6A
inet addr:172.25.215.31 Bcast:172.25.215.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feb2:106a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18162 errors:0 dropped:0 overruns:0 frame:0
TX packets:5625 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2458244 (2.3 MiB) TX bytes:508443 (496.5 KiB)

浙公网安备 33010602011771号