1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 00:42:08 +02:00

common/u*: add Chinese translation (#14688)

* common/u*: add Chinese translation

* Update uv-tool.md

* Update ugrep.md
This commit is contained in:
Jin 2024-11-19 04:23:02 -05:00 committed by GitHub
parent 156075e8b1
commit 2a4ef14253
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 601 additions and 0 deletions

24
pages.zh/common/u3d.md Normal file
View file

@ -0,0 +1,24 @@
# u3d
> 一组用于与 Unity 进行交互的工具。
> 更多信息:<https://github.com/DragonBox/u3d>.
- 使用正确的 Unity 版本打开当前目录中的项目:
`u3d`
- 列出已安装的 Unity 版本:
`u3d list`
- 列出可下载的 Unity 版本:
`u3d available`
- 下载并安装最新的稳定 Unity 版本:
`u3d install latest_stable`
- 下载并安装指定的 Unity 版本和编辑器包:
`u3d install {{2021.2.0f1}} -p {{Unity,iOS,Android}}`

View file

@ -0,0 +1,20 @@
# ufraw-batch
> 将来自相机的 RAW 文件转换为标准图像文件。
> 更多信息:<https://manned.org/ufraw-batch>.
- 简单地将 RAW 文件转换为 JPEG:
`ufraw-batch --out-type=jpg {{(或多个)输入文件}}`
- 简单地将 RAW 文件转换为 PNG:
`ufraw-batch --out-type=png {{(或多个)输入文件}}`
- 从 RAW 文件中提取预览图像:
`ufraw-batch --embedded-image {{(或多个)输入文件}}`
- 将文件保存为不超过给定的最大尺寸 MAX1 和 MAX2:
`ufraw-batch --size=MAX1,MAX2 {{(或多个)输入文件}}`

36
pages.zh/common/ugrep.md Normal file
View file

@ -0,0 +1,36 @@
# ugrep
> 超快速搜索工具,带有查询 TUI。
> 更多信息:<https://github.com/Genivia/ugrep>.
- 启动查询 TUI,在当前目录中递归搜索文件(按 CTRL-Z 获取帮助):
`ugrep --query`
- 在当前目录中递归搜索包含正则表达式搜索模式的文件:
`ugrep "{{search_pattern}}"`
- 在特定文件或特定目录中的所有文件中搜索,并显示匹配的行号:
`ugrep --line-number "{{search_pattern}}" {{路径/到/文件或目录}}`
- 递归搜索当前目录中的所有文件,并打印每个匹配文件的名称:
`ugrep --files-with-matches "{{search_pattern}}"`
- 模糊搜索文件,允许模式中多达 3 个额外、缺失或不匹配的字符:
`ugrep --fuzzy={{3}} "{{search_pattern}}"`
- 也递归搜索压缩文件、Zip 和 tar 存档:
`ugrep --decompress "{{search_pattern}}"`
- 仅搜索文件名匹配特定 glob 模式的文件:
`ugrep --glob="{{glob_pattern}}" "{{search_pattern}}"`
- 仅搜索 C++ 源文件(使用 `--file-type=list` 列出所有文件类型):
`ugrep --file-type=cpp "{{search_pattern}}"`

20
pages.zh/common/ulimit.md Normal file
View file

@ -0,0 +1,20 @@
# ulimit
> 获取和设置用户限制。
> 更多信息:<https://manned.org/ulimit>.
- 获取所有用户限制的属性:
`ulimit -a`
- 获取同时打开文件数量的硬限制:
`ulimit -H -n`
- 获取同时打开文件数量的软限制:
`ulimit -S -n`
- 设置每个用户的最大进程限制:
`ulimit -u 30`

20
pages.zh/common/umask.md Normal file
View file

@ -0,0 +1,20 @@
# umask
> 管理用户为新创建文件设置的读/写/执行权限掩码(即被限制的权限)。
> 更多信息:<https://manned.org/umask>.
- 显示当前掩码(八进制表示):
`umask`
- 以符号方式(人类可读格式)显示当前掩码:
`umask -S`
- 符号化更改掩码以允许所有用户的读取权限(掩码的其他部分保持不变):
`umask {{a+r}}`
- 设置掩码(使用八进制)以对文件的所有者不限制任何权限,对其他所有人限制所有权限:
`umask {{077}}`

17
pages.zh/common/umount.md Normal file
View file

@ -0,0 +1,17 @@
# umount
> 将文件系统与其挂载点解除链接,使其不再可访问。
> 当文件系统正在使用时,无法卸载。
> 更多信息:<https://man.openbsd.org/umount>.
- 卸载文件系统,通过传递挂载源的路径:
`umount {{路径/到/设备文件}}`
- 卸载文件系统,通过传递挂载目标的路径:
`umount {{路径/到/挂载目录}}`
- 卸载所有已挂载的文件系统(`proc` 文件系统除外):
`umount -a`

View file

@ -0,0 +1,8 @@
# unclutter
> 隐藏鼠标光标。
> 更多信息:<https://manned.org/unclutter.1x>.
- 在 3 秒后隐藏鼠标光标:
`unclutter -idle {{3}}`

View file

@ -0,0 +1,28 @@
# uncrustify
> C、C++、C#、D、Java 和 Pawn 源代码格式化工具。
> 更多信息:<https://github.com/uncrustify/uncrustify>.
- 格式化单个文件:
`uncrustify -f {{路径/到/文件.cpp}} -o {{路径/到/输出文件.cpp}}`
- 从 `stdin` 读取文件名,在写回原始文件路径之前创建备份:
`find . -name "*.cpp" | uncrustify -F - --replace`
- 不进行备份(适用于文件已在版本控制下的情况):
`find . -name "*.cpp" | uncrustify -F - --no-backup`
- 使用自定义配置文件并将结果写入 `stdout`
`uncrustify -c {{路径/到/uncrustify.cfg}} -f {{路径/到/文件.cpp}}`
- 显式设置配置变量的值:
`uncrustify --set {{选项}}={{值}}`
- 生成新的配置文件:
`uncrustify --update-config -o {{路径/到/新配置文件.cfg}}`

View file

@ -0,0 +1,24 @@
# unexpand
> 将空格转换为制表符。
> 更多信息:<https://www.gnu.org/software/coreutils/unexpand>.
- 将每个文件中的空格转换为制表符,并写入到 `stdout`
`unexpand {{路径/到/文件}}`
- 将空格转换为制表符,从 `stdout` 读取:
`unexpand`
- 转换所有空格,而不仅仅是开头的空格:
`unexpand -a {{路径/到/文件}}`
- 仅转换开头的空格序列(覆盖 -a):
`unexpand --first-only {{路径/到/文件}}`
- 将制表符间隔设置为某个字符数,而不是 8(启用 -a):
`unexpand -t {{数量}} {{路径/到/文件}}`

View file

@ -0,0 +1,25 @@
# unimatrix
> 使用 Unicode 字符模拟《黑客帝国》的视觉效果。
> 请参阅:`cmatrix`
> 更多信息:<https://github.com/will8211/unimatrix>.
- 模仿 `cmatrix` 的默认输出(无 Unicode,适用于 TTY):
`unimatrix --no-bold --speed {{96}} --character-list {{o}}`
- 无粗体字符,缓慢地显示,使用表情符号、数字和少量符号:
`unimatrix --no-bold --speed {{50}} --character-list {{ens}}`
- 更改字符的颜色:
`unimatrix --color {{red|green|blue|white|...}}`
- 使用字母代码选择字符集(可用字符集请参阅 `unimatrix --help`):
`unimatrix --character-list {{character_sets}}`
- 更改滚动速度:
`unimatrix --speed {{number}}`

25
pages.zh/common/uniq.md Normal file
View file

@ -0,0 +1,25 @@
# uniq
> 输出输入或文件中的唯一行。
> 因为它只检测相邻的重复行,所以需要先对它们进行排序。
> 更多信息:<https://www.gnu.org/software/coreutils/uniq>.
- 仅显示每行一次:
`sort {{路径/到/文件}} | uniq`
- 仅显示唯一的行:
`sort {{路径/到/文件}} | uniq -u`
- 仅显示重复的行:
`sort {{路径/到/文件}} | uniq -d`
- 显示每行的出现次数及其内容:
`sort {{路径/到/文件}} | uniq -c`
- 显示每行的出现次数,并按出现次数从高到低排序:
`sort {{路径/到/文件}} | uniq -c | sort -nr`

20
pages.zh/common/unison.md Normal file
View file

@ -0,0 +1,20 @@
# unison
> 双向文件同步工具。
> 更多信息:<https://github.com/bcpierce00/unison>.
- 同步两个目录(第一次同步这两个目录时会创建日志):
`unison {{路径/到/目录1}} {{路径/到/目录2}}`
- 自动接受(无冲突的)默认值:
`unison {{路径/到/目录1}} {{路径/到/目录2}} -auto`
- 使用模式忽略某些文件:
`unison {{路径/到/目录1}} {{路径/到/目录2}} -ignore {{模式}}`
- 查看文档:
`unison -doc {{主题}}`

View file

@ -0,0 +1,9 @@
# unlink
> 从文件系统中删除对文件的链接。
> 如果链接是文件的最后一个,文件内容将丢失。
> 更多信息:<https://www.gnu.org/software/coreutils/unlink>.
- 如果是最后一个链接,则删除指定的文件:
`unlink {{路径/到/文件}}`

13
pages.zh/common/unp.md Normal file
View file

@ -0,0 +1,13 @@
# unp
> 解压任意归档文件。
> 需要安装相关的解压程序,例如 RAR 文件需要安装 `unrar`
> 更多信息:<https://manned.org/unp>.
- 解压一个归档文件:
`unp {{路径/到/归档文件.zip}}`
- 解压多个归档文件:
`unp {{路径/到/归档文件1.tar.gz}} {{路径/到/归档文件2.rar}}`

24
pages.zh/common/unrar.md Normal file
View file

@ -0,0 +1,24 @@
# unrar
> 提取 RAR 压缩档案。
> 更多信息:<https://manned.org/unrar>.
- 提取文件并保留原始目录结构:
`unrar x {{路径/到/压缩包.rar}}`
- 将文件提取到指定路径,并保留原始目录结构:
`unrar x {{路径/到/压缩包.rar}} {{路径/到/解压目录}}`
- 提取文件到当前目录,但不保留档案中的目录结构:
`unrar e {{路径/到/压缩包.rar}}`
- 测试档案内每个文件的完整性:
`unrar t {{路径/到/压缩包.rar}}`
- 列出档案内的文件并不解压:
`unrar l {{路径/到/压缩包.rar}}`

16
pages.zh/common/unset.md Normal file
View file

@ -0,0 +1,16 @@
# unset
> 删除 Shell 变量或函数。
> 更多信息:<https://manned.org/unset>.
- 删除变量 `foo`,如果该变量不存在则删除函数 `foo`
`unset {{foo}}`
- 删除变量 foo 和 bar:
`unset -v {{foo}} {{bar}}`
- 删除函数 my_func:
`unset -f {{my_func}}`

View file

@ -0,0 +1,7 @@
# unzstd
> 这是 `zstd --decompress` 命令的一个别名。
- 查看原命令的文档:
`tldr zstd`

25
pages.zh/common/updog.md Normal file
View file

@ -0,0 +1,25 @@
# updog
> Python {{SimpleHTTPServer}} 的替代方案。
> 它允许通过 HTTP/S 上传和下载,可以设置临时 SSL 证书,并使用 HTTP 基本认证。
> 更多信息:<https://github.com/sc0tfree/updog>.
- 为当前目录启动 HTTP 服务器:
`updog`
- 为指定目录启动 HTTP 服务器:
`updog --directory {{/路径/到/目录}}`
- 在指定端口上启动 HTTP 服务器:
`updog --port {{端口}}`
- 使用密码启动 HTTP 服务器(要登录,请将用户名留空,并在密码字段中输入密码):
`updog --password {{密码}}`
- 通过 SSL 启用传输加密:
`updog --ssl`

38
pages.zh/common/upt.md Normal file
View file

@ -0,0 +1,38 @@
# upt
> 统一的界面,用于管理各种操作系统上的软件包,例如 Windows、许多 Linux 发行版、macOS、FreeBSD,甚至 Haiku。
> 它需要安装本机操作系统的软件包管理器。
> 请参阅:`flatpak``brew``scoop``apt``dnf`.
> 更多信息:<https://github.com/sigoden/upt>.
- 更新可用软件包的列表:
`upt update`
- 搜索指定的软件包:
`upt search {{搜索软件包关键词}}`
- 显示某个软件包的信息:
`upt info {{软件包}}`
- 安装指定的软件包:
`upt install {{软件包}}`
- 移除指定的软件包:
`upt {{remove|uninstall}} {{软件包}}`
- 升级所有已安装的软件包:
`upt upgrade`
- 升级指定的软件包:
`upt upgrade {{软件包}}`
- 列出已安装的软件包:
`upt list`

16
pages.zh/common/upx.md Normal file
View file

@ -0,0 +1,16 @@
# upx
> 压缩或解压可执行文件。
> 更多信息:<https://upx.github.io>.
- 压缩可执行文件:
`upx {{路径/到/文件}}`
- 解压可执行文件:
`upx -d {{路径/到/文件}}`
- 详细帮助:
`upx --help`

13
pages.zh/common/users.md Normal file
View file

@ -0,0 +1,13 @@
# users
> 显示已登录用户的列表。
> 请参阅:`useradd``userdel``usermod`
> 更多信息:<https://www.gnu.org/software/coreutils/users>.
- 输出已登录的用户名:
`users`
- 根据指定的文件输出已登录的用户名:
`users {{/var/log/wmtp}}`

32
pages.zh/common/usql.md Normal file
View file

@ -0,0 +1,32 @@
# usql
> 通用 SQL 数据库的命令行界面。
> 更多信息:<https://github.com/xo/usql>.
- 连接到一个特定的数据库:
`usql {{sqlserver|mysql|postgres|sqlite3|...}}://{{用户名}}:{{密码}}@{{主机}}:{{端口}}/{{数据库名}}`
- 从文件中执行命令:
`usql --file={{路径/到/文件.sql}}`
- 执行一个特定的 SQL 命令:
`usql --command="{{sql命令}}"`
- 在 `usql` 提示符下运行一个 SQL 命令:
`{{prompt}}=> {{sql命令}}`
- 显示数据库架构:
`{{prompt}}=> \d`
- 将查询结果导出到一个特定文件:
`{{prompt}}=> \g {{路径/到/结果文件}}`
- 从 CSV 文件导入数据到一个特定表:
`{{prompt}}=> \copy {{路径/到/data.csv}} {{表名}}`

View file

@ -0,0 +1,12 @@
# uudecode
> 解码被 `uuencode` 编码的文件。
> 更多信息:<https://manned.org/uudecode>.
- 解码用 `uuencode` 编码的文件,并将结果打印到 `stdout`
`uudecode {{路径/到/编码文件}}`
- 解码用 `uuencode` 编码的文件,并将结果写入到一个文件中:
`uudecode -o {{路径/到/解码文件}} {{路径/到/编码文件}}`

View file

@ -0,0 +1,16 @@
# uuencode
> 将二进制文件编码为 ASCII,以便通过仅支持简单 ASCII 编码的媒介传输。
> 更多信息:<https://manned.org/uuencode>.
- 编码一个文件并将结果打印到 `stdout`
`uuencode {{路径/到/输入文件}} {{解码后文件名}}`
- 编码一个文件并将结果写入到一个文件:
`uuencode -o {{路径/到/输出文件}} {{路径/到/输入文件}} {{解码后文件名}}`
- 使用 Base64 而不是默认的 uuencode 编码一个文件,并将结果写入到一个文件:
`uuencode -m -o {{路径/到/输出文件}} {{路径/到/输入文件}} {{解码后文件名}}`

View file

@ -0,0 +1,28 @@
# uv python
> 管理 Python 版本和安装。
> 更多信息:<https://docs.astral.sh/uv/reference/cli/#uv-python>.
- 列出所有可用的 Python 安装:
`uv python list`
- 安装某个版本的 Python:
`uv python install {{版本}}`
- 卸载某个版本的 Python:
`uv python uninstall {{版本}}`
- 搜索某个版本的 Python 安装:
`uv python find {{版本}}`
- 锁定当前项目使用特定版本的 Python:
`uv python pin {{版本}}`
- 显示 `uv` Python 安装目录:
`uv python dir`

View file

@ -0,0 +1,24 @@
# uv tool
> 安装和运行由 Python 软件包提供的命令。
> 更多信息:<https://docs.astral.sh/uv/reference/cli/#uv-tool>.
- 运行一个来自软件包的命令,而不安装它:
`uv tool run {{命令}}`
- 在系统范围内安装一个 Python 软件包:
`uv tool install {{软件包}}`
- 升级已安装的 Python 软件包:
`uv tool upgrade {{软件包}}`
- 卸载一个 Python 软件包:
`uv tool uninstall {{软件包}}`
- 列出系统范围内已安装的 Python 软件包:
`uv tool list`

37
pages.zh/common/uv.md Normal file
View file

@ -0,0 +1,37 @@
# uv
> 一个快速的 Python 软件包和项目管理器。
> 此命令也有关于其子命令的文件,例如:`tool``python`.
> 更多信息:<https://docs.astral.sh/uv/reference/cli>.
- 在当前目录中创建一个新的 Python 项目:
`uv init`
- 在具有指定名称的目录中创建一个新的 Python 项目:
`uv init {{项目名称}}`
- 向项目中添加一个新的软件包:
`uv add {{软件包}}`
- 从项目中移除一个软件包:
`uv remove {{软件包}}`
- 在项目的环境中运行一个脚本:
`uv run {{路径/到/脚本.py}}`
- 在项目的环境中运行一个命令:
`uv run {{命令}}`
- 从 `pyproject.toml` 更新项目的环境:
`uv sync`
- 为项目的依赖项创建一个锁定文件:
`uv lock`

View file

@ -0,0 +1,24 @@
# uvicorn
> Python 的 ASGI HTTP 服务器,适用于异步项目。
> 更多信息:<https://www.uvicorn.org/>.
- 运行 Python Web 应用:
`uvicorn {{导入路径:应用对象}}`
- 在本地主机上监听端口 8080:
`uvicorn --host {{localhost}} --port {{8080}} {{导入路径:应用对象}}`
- 启用实时重新加载:
`uvicorn --reload {{导入路径:应用对象}}`
- 使用 4 个工作进程处理请求:
`uvicorn --workers {{4}} {{导入路径:应用对象}}`
- 通过 HTTPS 运行应用:
`uvicorn --ssl-certfile {{cert.pem}} --ssl-keyfile {{key.pem}} {{导入路径:应用对象}}`