1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages.zh/common/!.md
Ren Ma a95bc099de
!: add Chinese translation (#11709)
* !: add Chinese translation

---------

Co-authored-by: Ein Verne <git@einverne.info>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-13 12:07:55 +05:30

531 B

Exclamation mark

Bash 内置命令,用于替换历史记录中找到的命令。 更多信息:https://www.gnu.org/software/bash/manual/bash.html#Event-Designators.

  • 使用sudo重新执行上一个命令:

sudo !!

  • 通过在history中出现的行号来调取命令:

!{{行号}}

  • 调取history中的倒数第数字条命令:

!-{{数字}}

  • 调取以字符串开头的最近执行的命令:

!{{字符串}}

  • 调取上一个命令的参数给当前命令

{{当前命令}} !*