Linux中,history命令的作用是显示历史记录和执行过的命令。
- 查看历史所有命令执行记录
history - 查看最近的13条历史执行命令
history 13 - 执行历史记录中,序号为123的命令
!123 - 重复执行上一个命令
!! - 查看 cat 命令的历史执行记录
history | grep cat - 清空所有历史命令的记录
history -c
原文地址:https://www.cnblogs.com/wintest/p/11183718.html
时间: 2024-12-16 22:36:32