Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pages.zh/osx: add Chinese translation #2796

Merged
merged 36 commits into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d89bdff
airport: add Chinese translation
wizarot Feb 26, 2019
2a51535
apachectl: add Chinese translation
wizarot Feb 26, 2019
a40dafe
archey: add Chinese translation
wizarot Feb 26, 2019
efb89cc
as: add Chinese translation
wizarot Feb 26, 2019
4d5ddd8
asr: add Chinese translation
wizarot Feb 26, 2019
7a837ba
base64: add Chinese translation
wizarot Feb 26, 2019
c7a40a9
brew-cask: add Chinese translation
wizarot Feb 26, 2019
409455f
brew-mas: add Chinese translation
wizarot Feb 26, 2019
c2650c7
brew: add Chinese translation
wizarot Feb 26, 2019
4a1c3bf
brightness: add Chinese translation
wizarot Feb 26, 2019
a8b1105
caffeinate: add Chinese translation
wizarot Feb 26, 2019
9f4031a
cal: add Chinese translation
wizarot Feb 26, 2019
0e2ee3d
carthage: add Chinese translation
wizarot Feb 26, 2019
40cc28f
chflags: add Chinese translation
wizarot Feb 26, 2019
9c194e4
codesign: add Chinese translation
wizarot Feb 26, 2019
743f8a0
command: add Chinese translation
wizarot Feb 26, 2019
b020e32
compgen: add Chinese translation
wizarot Feb 26, 2019
b534b39
date: add Chinese translation
wizarot Feb 26, 2019
6a15395
dd: add Chinese translation
wizarot Feb 26, 2019
48ac6ee
defaults: add Chinese translation
wizarot Feb 26, 2019
34626d6
diskutil: add Chinese translation
wizarot Feb 26, 2019
a00b252
ditto: add Chinese translation
wizarot Feb 26, 2019
dfe5063
dmesg: add Chinese translation
wizarot Feb 26, 2019
cf50ed4
drutil: add Chinese translation
wizarot Feb 26, 2019
dc1ac33
du: add Chinese translation
wizarot Feb 26, 2019
1465bbc
duti: add Chinese translation
wizarot Feb 26, 2019
f4391fb
eval: add Chinese translation
wizarot Feb 26, 2019
e3ec8e1
export: add Chinese translation
wizarot Feb 26, 2019
c0ae1e5
fc: add Chinese translation
wizarot Feb 26, 2019
34d7d63
feh: add Chinese translation
wizarot Feb 26, 2019
ea949f4
file: add Chinese translation
wizarot Feb 26, 2019
de4189b
fsck: add Chinese translation
wizarot Feb 26, 2019
106dbad
gunicorn: add Chinese translation
wizarot Feb 26, 2019
22448f9
head: add Chinese translation
wizarot Feb 26, 2019
5750f04
hexdump: add Chinese translation
wizarot Feb 26, 2019
8d37700
hostname: add Chinese translation
wizarot Feb 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions pages.zh/osx/airport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# airport

> 无线网络配置工具.

- 显示当前的无线状态信息:

`airport -I`

- 在通道 1 上监察(嗅探)无线流量:

`airport sniff {{1}}`

- 扫描可用的无线网络:

`airport -s`

- 与当前的 Airport 网络脱离连接:

`sudo airport -z`
15 changes: 15 additions & 0 deletions pages.zh/osx/apachectl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# apachectl

> 用于macOS的Apache HTTP Server控制接口(工具).

- 启动 org.apache.httpd 服务:

`apachectl start`

- 停止已启动的服务:

`apachectl stop`

- 重新启动服务:

`apachectl restart`
19 changes: 19 additions & 0 deletions pages.zh/osx/archey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# archey

> 漂亮地显示简单系统信息工具.

- 显示系统信息(彩色的):

`archey`

- 显示系统信息(单色的):

`archey --nocolor`

- 显示系统信息, 使用 MacPorts(命令行软件安装管理工具port)来替代Homebrew(另一种更常用的mac命令行软件安装管理工具):

`archey --macports`

- 显示系统信息,但不进行IP地址获取和验证:

`archey --offline`
20 changes: 20 additions & 0 deletions pages.zh/osx/as.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# as

> 便携式 GNU 汇编程序.
> 主要用于汇编 `gcc` 的输出以供 `ld` 使用

- 汇编文件,将输出写入a.out:

`as {{文件.s}}`

- 将输出汇编到给定文件:

`as {{文件.s}} -o {{输出.o}}`

- 通过跳过空白和注释预处理来更快地生成输出. (应该只用于受信任的编译器):

`as -f {{文件.s}}`

- 在目录列表中包含一个给定路径, 以搜索 .include 指令中指定的文件:

`as -I {{目标文件夹}} {{文件.s}}`
20 changes: 20 additions & 0 deletions pages.zh/osx/asr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# asr

> 将磁盘映像还原(复制)到卷上.
> 命令名称是Apple Software Restore的缩写.

- 将磁盘映像复制到目标卷:

`sudo asr restore --source {{映像名}}.dmg --target {{卷路径}}`

- 在复制之前擦除目标卷:

`sudo asr restore --source {{映像名}}.dmg --target {{卷路径}} --erase`

- 恢复后跳过验证步骤:

`sudo asr restore --source {{映像名}}.dmg --target {{卷路径}} --noverify`

- 不使用中间磁盘映像直接复制卷中的数据:

`sudo asr restore --source {{卷路径}} --target {{复制卷路径}}`
19 changes: 19 additions & 0 deletions pages.zh/osx/base64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# base64

> 使用Base64来进行编码和解码.

- 编码目标文件:

`base64 -i {{目标文件}}`

- 解码目标文件:

`base64 -D -i {{base64编码文件}}`

- 通过标准输入管道进行解码:

`echo -n {{目标字符串}} | base64`

- 解码标准输入管道内容:

`echo -n {{base64字符串}} | base64 -D`
35 changes: 35 additions & 0 deletions pages.zh/osx/brew-cask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# brew cask

> macOs 上的应用程序包管理工具.

- 模糊搜索可用命令行工具和软件包:

`brew search {{软件名}}`

- 安装一个软件:

`brew cask install {{软件名}}`

- 列出全部已安装软件:

`brew cask list`

- 列出全部已安装的软件中,可以升级的:

`brew cask outdated`

- 将一个已安装的软件升级到最新的版本:

`brew cask upgrade {{软件名}}`

- 删除一个软件(仅通过brew cask install方式安装的):

`brew cask uninstall {{软件名}}`

- 卸载一个软件并删除相关的设置和文件:

`brew cask zap {{软件名}}`

- 显示指定软件的相关信息:

`brew cask info {{软件名}}`
27 changes: 27 additions & 0 deletions pages.zh/osx/brew-mas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# brew mas

> Mas是一个简单的 Mac App Store 命令行界面.

- 按应用名称搜索 Mac App Store 并返回匹配的标识符:

`mas search {{应用名}}`

- 安装或更新以前购买的应用程序:

`mas install {{应用名}} {{应用ID}}`

- 显示所有已安装的应用程序及其应用ID:

`mas list`

- 列出等待更新的已安装应用:

`mas outdated`

- 升级所有可升级的应用:

`mas upgrade`

- 升级指定的应用:

`mas upgrade {{应用ID}}`
39 changes: 39 additions & 0 deletions pages.zh/osx/brew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# brew

> macOS 上的软件包管理工具.

- 搜索可用的命令行和软件安装包:

`brew search {{软件名}}`

- 安装最新版本的命令行软件 (使用 `--devel` 可以指定安装更新的开发版):

`brew install {{软件名}}`

- 列出已(通过brew)安装的命令行工具:

`brew list`

- 升级已安装的命令行软件(如果未给出命令行软件名称,则升级所有已安装的软件):

`brew upgrade {{软件名}}`

- 从 GitHub 上升级brew和软件库到最新:

`brew update`

- 删除已安装软件的旧版本 (如果未给出软件名称,则处理所有已安装的软件-并不会影响到当前使用的已安装版本. 可以理解为清一下缓存释放空间.):

`brew cleanup {{软件名}}`

- 显示有关指定软件的信息(版本,安装路径,依赖关系等 -真的很有用!):

`brew info {{软件名}}`

- 检查本地Homebrew安装是否存在潜在问题,并给出一些解决建议:

`brew doctor`

- 启动通过brew安装的服务,如nginx,mysql等.启动后还会自动随开机启动,直到你选择stop停止. (缺点是如果发生错误,它也会返回成功,而不是报错.)

`brew searvices {{start|stop|restart}} {{软件名}}`
15 changes: 15 additions & 0 deletions pages.zh/osx/brightness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# brightness

> 获取或设置所有显示设备的亮度等级.

- 显示当前亮度:

`brightness -l`

- 设置亮度到 100%::

`brightness {{1}}`

- 设置亮度到 50%::

`brightness {{0.5}}`
15 changes: 15 additions & 0 deletions pages.zh/osx/caffeinate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# caffeinate

> 防止 Mac 进入休眠模式.

- 防止进入休眠模式 , 1小时内(3600秒):

`caffeinate -u -t {{3600}}`

- 在指定命令执行完前,禁止进入休眠:

`caffeinate -s {{命令}}`

- 在你按 Ctrl-C 之前禁止进入休眠模式:

`caffeinate -i`
31 changes: 31 additions & 0 deletions pages.zh/osx/cal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# cal

> 打印日历信息.

- 打印本月日历:

`cal`

- 显示上个月,当前月,下个月的日历:

`cal -3`

- 显示指定月份的日历(month 为 1-12):

`cal -m {{月}}`

- 显示全年日历:

`cal -y`

- 显示指定某年的日历 (year 为 4 个数字):

`cal {{年}}`

- 显示特定年和月的日历:

`cal {{月}} {{年}}`

- 显示指定年的复活节日期:

`ncal -e {{年}}`
23 changes: 23 additions & 0 deletions pages.zh/osx/carthage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# carthage

> Cocoa应用程序的依赖性管理工具

- 下载 Cartfile 中提到的所有依赖项的最新版本,并编译它们:

`carthage update`

- 仅针对 IOS平台,升级依赖文件 :

`carthage update --platform ios`

- 仅更新依赖,但不编译它们 :

`carthage update --no-build`

- 下载并重新生成依赖项的当前版本(不更新它们):

`carthage bootstrap`

- 重新编译特定依赖项 :

`carthage build {{依赖包}}`
19 changes: 19 additions & 0 deletions pages.zh/osx/chflags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# chflags

> 更改文件或文件夹的标志.

- 给文件设置 hidden(隐藏) 标签:

`chflags {{hidden}} {{文件路径}}`

- 取消文件的 hidden 标签:

`chflags {{hidden}} {{文件路径}}`

- 递归地给文件夹中每个文件设置 uchg 标志:

`chflags -R {{uchg}} {{文件夹路径}}`

- 递归地撤销文件夹中每个文件设置的 uchg 标志:

`chflags -R {{nouchg}} {{文件夹路径}}`
11 changes: 11 additions & 0 deletions pages.zh/osx/codesign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# codesign

> 为 macOS 的应用程序签名.

- 用证书签名:

`codesign -s {{"公司名称"}} {{路径/应用名.app}}`

- 验证应用程序的签名:

`codesign -v {{路径/应用名.app}}`
7 changes: 7 additions & 0 deletions pages.zh/osx/command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# command

> 命令强制 shell 执行命令程序,并忽略具有相同名称的任何函数、内置函数和别名.(会忽略掉一切别名等,执行命令本身)

- 从字面上执行ls程序,即使存在ls别名:

`command {{ls}}`
23 changes: 23 additions & 0 deletions pages.zh/osx/compgen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# compgen

> 用于在bash中自动完成的内置命令,按两次tab键即可调用该命令.

- 显示所有可以执行的命令:

`compgen -c`

- 列出所有别名:

`compgen -a`

- 列出所有可以运行的函数:

`compgen -A function`

- 列出所有shell的保留关键字:

`compgen -k`

- 查看以 'ls' 开头的所有可用命令和别名:

`compgen -ac {{ls}}`
19 changes: 19 additions & 0 deletions pages.zh/osx/date.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# date

> 设置或显示系统日期

- 使用默认区域设置的格式显示当前日期 :

`date +"%c"`

- 以 UTC 和 ISO 8601 格式显示当前日期:

`date -u +"%Y-%m-%dT%H:%M:%SZ"`

- 将当前日期显示为unix时间戳(自1970-01-01 00:00:00以来的秒数)

`date +%s`

- 使用默认格式显示特定日期(格式化指定UNIX时间戳):

`date -r 1473305798`
Loading