Files
tldr/pages.zh/common/!.md
forty2 ab00815915 !, ipconfig: update Chinese translation (#15123)
* Update ipconfig.md

zh pages is outdated so I translate it from its en pages.

* Update !.md

it is outdated so i translate the changes from en pages

* Update pages.zh/common/!.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

---------

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
2024-12-14 21:15:35 -08:00

37 lines
777 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Exclamation mark
> Bash 内置命令,用于替换历史记录中找到的命令。
> 更多信息:<https://gnu.org/software/bash/manual/bash.html#Event-Designators>.
- 使用`sudo`重新执行上一个命令:
`sudo !!`
- 通过在`history`中出现的`行号`来调取命令:
`!{{行号}}`
- 调取`history`中的倒数第`数字`条命令:
`!-{{数字}}`
- 调取以`字符串`开头的最近执行的命令:
`!{{字符串}}`
- 调取上一个命令的参数给`当前命令`
`{{当前命令}} !*`
- 调取上一个命令的最后一个参数给`当前命令`
`{{当前命令}} !$`
- 调取上一个命令,但不包含最后一个参数:
`!:-`
- 显示以特定字符串开头的最后一个命令,但不执行:
`!{{字符串}}:p`