Linux fc命令:修改或执行命令。 Linux fc命令 功能描述 使用fc命令可以编辑曾经执行过的命令,并以批处理的形式让这些命令重新得到执行。 Linux fc命令 语法 fc [选项] [第一个命令] [最后一个命令] fc [选项] [旧值=新值] [命令] BashCopy 命令中各选项的含义如下表所示。 Linux fc命令 示例 列出当前执行过的命令 [root@rhel ~]# fc -l BashCopy 列出执行过的前3个命令 [root@rhel ~]# fc -l -3 BashCopy 列出执行过的第273个命令 [root@rhel ~]# fc 273 BashCopy 列出执行过的第271~273个命令 [root@rhel ~]# fc 271273 BashCopy 找到以mkdir字符开头的命令,将abcde更改为edcba,并显示和执行该命令 [root@rhel ~]# mkdir abcde [root@rhel ~]# fc -s abcde=edcba mkdir mkdir edcbaBashCopy