mirror of https://github.com/alibaba/arthas.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
620 B
Markdown
32 lines
620 B
Markdown
3 years ago
|
# history
|
||
|
|
||
|
打印命令历史。
|
||
|
|
||
|
::: tip
|
||
|
历史指令会通过一个名叫 history 的文件持久化,所以 history 指令可以查看当前 arthas 服务器的所有历史命令,而不仅只是当前次会话使用过的命令。
|
||
|
:::
|
||
|
|
||
|
### 参数说明
|
||
|
|
||
|
| 参数名称 | 参数说明 |
|
||
|
| -------: | :---------------------- |
|
||
|
| [c:] | 清空历史指令 |
|
||
|
| [n:] | 显示最近执行的 n 条指令 |
|
||
|
|
||
|
### 使用参考
|
||
|
|
||
|
```
|
||
|
#查看最近执行的3条指令
|
||
|
$ history 3
|
||
|
269 thread
|
||
|
270 cls
|
||
|
271 history 3
|
||
|
```
|
||
|
|
||
|
```
|
||
|
#清空指令
|
||
|
$ history -c
|
||
|
$ history 3
|
||
|
1 history 3
|
||
|
```
|