add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

36
pages.zh/netbsd/cal.md Normal file
View File

@@ -0,0 +1,36 @@
# 日历
> 显示一个日历。
> 更多信息:<https://man.netbsd.org/cal.1>。
- 显示当前月份的日历:
`cal`
- 显示特定年份的日历:
`cal {{year}}`
- 显示特定月份和年份的日历:
`cal {{month}} {{year}}`
- 使用 [j]ulian 天显示当前年份的完整日历从1月1日起的基数编号
`cal -y -j`
- [h]ighlight 今天并显示跨越日期的 [3] 个月:
`cal -h -3 {{month}} {{year}}`
- 显示当前年份中特定月份之前的 2 个月和之后的 3 个月:
`cal -A 3 -B 2 {{month}}`
- 显示指定月份之前和之后的特定数量的月份([C]ontext
`cal -C {{months}} {{month}}`
- 指定一周的开始 [d]ay0: 星期天1: 星期一,..., 6: 星期六):
`cal -d {{0..6}}`

7
pages.zh/netbsd/chfn.md Normal file
View File

@@ -0,0 +1,7 @@
# chfn
> 该命令是 `chpass` 的别名。
- 查看原始命令的文档:
`tldr chpass`

29
pages.zh/netbsd/chpass.md Normal file
View File

@@ -0,0 +1,29 @@
# chpass
> 添加或更改用户数据库信息,包括登录 shell 和密码。
> 另见:`passwd`。
> 更多信息:<https://man.netbsd.org/chsh>。
- 交互式地为当前用户设置特定的登录 shell
`su -c chpass`
- 为当前用户设置特定的登录 [s]hell
`chpass -s {{path/to/shell}}`
- 为特定用户设置登录 [s]hell
`chpass chsh -s {{path/to/shell}} {{username}}`
-`passwd` 文件格式中指定用户数据库条目:
`su -c 'chpass -a {{username:encrypted_password:uid:gid:...}} -s {{path/to/file}}' {{username}}`
- 仅更新 [l]ocal 密码文件:
`su -c 'chpass -l -s {{path/to/shell}}' {{username}}`
- 强制更改数据库 [y]P 密码数据库条目:
`su -c 'chpass -y -s {{path/to/shell}}' {{username}}`

7
pages.zh/netbsd/chsh.md Normal file
View File

@@ -0,0 +1,7 @@
# chsh
> 该命令是 `chpass` 的别名。
- 查看原始命令的文档:
`tldr chpass`

32
pages.zh/netbsd/df.md Normal file
View File

@@ -0,0 +1,32 @@
# df
> 显示文件系统磁盘空间使用情况的概述。
> 更多信息:<https://man.netbsd.org/df.1>。
- 使用512字节单位显示所有文件系统及其磁盘使用情况
`df`
- 使用[可]读单位基于1024的幂
`df -h`
- 显示`statvfs`返回的结构的所有字段:
`df -G`
- 显示包含给定文件或目录的文件系统及其磁盘使用情况:
`df {{path/to/file_or_directory}}`
- 包括有关空闲和已用[i]节点数量的统计信息:
`df -i`
- 在写入空间数字时使用1024字节单位
`df -k`
- 以[P]可移植的方式显示信息:
`df -P`

28
pages.zh/netbsd/pkgin.md Normal file
View File

@@ -0,0 +1,28 @@
# pkgin
> 在 NetBSD 上管理 `pkgsrc` 二进制包。
> 更多信息:<https://pkgin.net/#usage>。
- 安装一个包:
`pkgin install {{package}}`
- 移除一个包及其依赖:
`pkgin remove {{package}}`
- 升级所有包:
`pkgin full-upgrade`
- 搜索一个包:
`pkgin search {{keyword}}`
- 列出已安装的包:
`pkgin list`
- 移除不需要的依赖:
`pkgin autoremove`

33
pages.zh/netbsd/sed.md Normal file
View File

@@ -0,0 +1,33 @@
# sed
> 以可脚本化的方式编辑文本。
> 另请参见:`awk``ed`。
> 更多信息:<https://man.netbsd.org/sed.1>。
- 在所有输入行中,将所有 `apple` (基本正则表达式)替换为 `mango` (基本正则表达式),并将结果打印到 `stdout`
`{{command}} | sed 's/apple/mango/g'`
- 执行特定脚本 [f]ile 并将结果打印到 `stdout`
`{{command}} | sed -f {{path/to/script.sed}}`
- 延迟打开每个文件,直到对输入行应用包含相关 `w` 函数或标志的命令:
`{{command}} | sed -fa {{path/to/script.sed}}`
- 启用 GNU re[g]ex 扩展:
`{{command}} | sed -fg {{path/to/script.sed}}`
- 在所有输入行中,将所有 `apple` (扩展正则表达式)替换为 `APPLE` (扩展正则表达式),并将结果打印到 `stdout`
`{{command}} | sed -E 's/(apple)/\U\1/g'`
- 仅将第一行打印到 `stdout`
`{{command}} | sed -n '1p'`
- 在特定文件中,将所有 `apple` (基本正则表达式)替换为 `mango` (基本正则表达式),并在原位置覆盖原文件:
`sed -i 's/apple/mango/g' {{path/to/file}}`

View File

@@ -0,0 +1,26 @@
# sockstat
> 列出打开的互联网或UNIX域套接字。
> 注意该程序是为NetBSD 3.0重新编写的源自FreeBSD的`sockstat`。
> 另见:`netstat`。
> 更多信息:<https://man.netbsd.org/sockstat.1>。
- 显示IPv4、IPv6和Unix套接字的监听和连接状态的信息
`sockstat`
- 显示在特定端口上监听的IPv[4]/IPv[6]套接字的信息,使用特定协议:
`sockstat -{{4|6}} -l -P {{tcp|udp|sctp|divert}} -p {{port1,port2...}}`
- 也显示连接的套接字显示UNIX套接字
`sockstat -cu`
- 仅显示数字输出,不解析地址和端口的符号名称:
`sockstat -n`
- 仅列出指定地址族的套接字:
`sockstat -f {{inet|inet6|local|unix}}`