Skip to content

Commit 8c6723a

Browse files
committed
修复排版
1 parent 718d3f7 commit 8c6723a

File tree

3 files changed

+67
-69
lines changed

3 files changed

+67
-69
lines changed

command/ftp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ftp(选项)(参数)
2929

3030
### 实例
3131

32-
```shell
32+
```bash
3333
ftp> ascii # 设定以ASCII方式传送文件(缺省值)
3434
ftp> bell # 每完成一次文件传送,报警提示.
3535
ftp> binary # 设定以二进制方式传送文件.
@@ -68,22 +68,22 @@ ftp> ! # 从 ftp 子系统退出到外壳。
6868
6969
关闭FTP连接
7070
71-
```shel
71+
```bash
7272
bye
7373
exit
7474
quit
7575
```
7676
7777
下载文件
7878
79-
```shell
79+
```bash
8080
ftp> get readme.txt # 下载 readme.txt 文件
8181
ftp> mget *.txt # 下载
8282
```
8383
8484
上传文件
8585
86-
```shell
86+
```bash
8787
ftp> put /path/readme.txt # 上传 readme.txt 文件
8888
ftp> mput *.txt # 可以上传多个文件
8989
```

command/grep.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ grep
99

1010
### 选项
1111

12-
```
12+
```bash
1313
-a --text # 不要忽略二进制数据。
1414
-A <显示行数> --after-context=<显示行数> # 除了显示符合范本样式的那一行之外,并显示该行之后的内容。
15-
-b --byte-offset # 在显示符合范本样式的那一行之外,并显示该行之前的内容。
15+
-b --byte-offset # 在显示符合范本样式的那一行之外,并显示该行之前的内容。
1616
-B<显示行数> --before-context=<显示行数> # 除了显示符合样式的那一行之外,并显示该行之前的内容。
1717
-c --count # 计算符合范本样式的列数。
18-
-C<显示行数> --context=<显示行数>或-<显示行数># 除了显示符合范本样式的那一列之外,并显示该列之前后的内容。
18+
-C<显示行数> --context=<显示行数>或-<显示行数> # 除了显示符合范本样式的那一列之外,并显示该列之前后的内容。
1919
-d<进行动作> --directories=<动作> # 当指定要查找的是目录而非文件时,必须使用这项参数,否则grep命令将回报信息并停止动作。
2020
-e<范本样式> --regexp=<范本样式> # 指定字符串作为查找文件内容的范本样式。
2121
-E --extended-regexp # 将范本样式为延伸的普通表示法来使用,意味着使用能使用扩展正则表达式。
@@ -32,7 +32,7 @@ grep
3232
-R/-r --recursive # 此参数的效果和指定“-d recurse”参数相同。
3333
-s --no-messages # 不显示错误信息。
3434
-v --revert-match # 反转查找。
35-
-V --version #显示版本信息。
35+
-V --version # 显示版本信息。
3636
-w --word-regexp # 只显示全字符合的列。
3737
-x --line-regexp # 只显示全列符合的列。
3838
-y # 此参数效果跟“-i”相同。
@@ -197,8 +197,8 @@ grep "main()" . -r --exclude-from filelist
197197

198198
使用0值字节后缀的grep与xargs:
199199

200-
```
201-
#测试文件:
200+
```bash
201+
# 测试文件:
202202
echo "aaa" > file1
203203
echo "bbb" > file2
204204
echo "aaa" > file3
@@ -211,31 +211,29 @@ grep "aaa" file* -lZ | xargs -0 rm
211211

212212
grep静默输出:
213213

214-
```
214+
```bash
215215
grep -q "test" filename
216-
217-
#不会输出任何信息,如果命令运行成功返回0,失败则返回非0值。一般用于条件测试。
218-
216+
# 不会输出任何信息,如果命令运行成功返回0,失败则返回非0值。一般用于条件测试。
219217
```
220218

221219
打印出匹配文本之前或者之后的行:
222220

223-
```
224-
#显示匹配某个结果之后的3行,使用 -A 选项:
221+
```bash
222+
# 显示匹配某个结果之后的3行,使用 -A 选项:
225223
seq 10 | grep "5" -A 3
226224
5
227225
6
228226
7
229227
8
230228

231-
#显示匹配某个结果之前的3行,使用 -B 选项:
229+
# 显示匹配某个结果之前的3行,使用 -B 选项:
232230
seq 10 | grep "5" -B 3
233231
2
234232
3
235233
4
236234
5
237235

238-
#显示匹配某个结果的前三行和后三行,使用 -C 选项:
236+
# 显示匹配某个结果的前三行和后三行,使用 -C 选项:
239237
seq 10 | grep "5" -C 3
240238
2
241239
3
@@ -245,7 +243,7 @@ seq 10 | grep "5" -C 3
245243
7
246244
8
247245

248-
#如果匹配结果有多个,会用“--”作为各匹配结果之间的分隔符:
246+
# 如果匹配结果有多个,会用“--”作为各匹配结果之间的分隔符:
249247
echo -e "a\nb\nc\na\nb\nc" | grep a -A 1
250248
a
251249
b

command/tree.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -15,62 +15,62 @@ tree(选项)(参数)
1515

1616
### 选项
1717

18-
```
18+
```bash
1919
------- 列表选项 -------
20-
-a 显示所有文件和目录。
21-
-d 先是目录名称而非文件。
22-
-l 如遇到性质为符号连接的目录,直接列出该连接所指向的原始目录。
23-
-f 在每个文件或目录之前,显示完整的相对路径名称。
24-
-x 将范围局限在现行的文件系统中,若指定目录下的某些子目录,其存放于另一个文件系统上,则将该目录予以排除在寻找范围外。
25-
-L level 限制目录显示层级。
26-
-R Rerun tree when max dir level reached.
27-
-P pattern <范本样式> 只显示符合范本样式的文件和目录名称。
28-
-I pattern Do not list files that match the given pattern.
29-
--ignore-case Ignore case when pattern matching.
30-
--matchdirs Include directory names in -P pattern matching.
31-
--noreport Turn off file/directory count at end of tree listing.
32-
--charset X Use charset X for terminal/HTML and indentation line output.
33-
--filelimit # Do not descend dirs with more than # files in them.
34-
--timefmt <f> Print and format time according to the format <f>.
35-
-o filename Output to file instead of stdout.
20+
-a # 显示所有文件和目录。
21+
-d # 先是目录名称而非文件。
22+
-l # 如遇到性质为符号连接的目录,直接列出该连接所指向的原始目录。
23+
-f # 在每个文件或目录之前,显示完整的相对路径名称。
24+
-x # 将范围局限在现行的文件系统中,若指定目录下的某些子目录,其存放于另一个文件系统上,则将该目录予以排除在寻找范围外。
25+
-L level # 限制目录显示层级。
26+
-R # Rerun tree when max dir level reached.
27+
-P pattern # <范本样式> 只显示符合范本样式的文件和目录名称。
28+
-I pattern # Do not list files that match the given pattern.
29+
--ignore-case # Ignore case when pattern matching.
30+
--matchdirs # Include directory names in -P pattern matching.
31+
--noreport # Turn off file/directory count at end of tree listing.
32+
--charset X # Use charset X for terminal/HTML and indentation line output.
33+
--filelimit # # Do not descend dirs with more than # files in them.
34+
--timefmt <f> # Print and format time according to the format <f>.
35+
-o filename # Output to file instead of stdout.
3636
-------- 文件选项 ---------
37-
-q 用“?”号取代控制字符,列出文件和目录名称。
38-
-N 直接列出文件和目录名称,包括控制字符。
39-
-Q Quote filenames with double quotes.
40-
-p 列出权限标示。
41-
-u 列出文件或目录的拥有者名称,没有对应的名称时,则显示用户识别码。
42-
-g 列出文件或目录的所属群组名称,没有对应的名称时,则显示群组识别码。
43-
-s 列出文件和目录大小。
44-
-h Print the size in a more human readable way.
45-
--si Like -h, but use in SI units (powers of 1000).
46-
-D 列出文件或目录的更改时间。
47-
-F 在执行文件,目录,Socket,符号连接,管道名称名称,各自加上"*","/","@","|"号。
48-
--inodes Print inode number of each file.
49-
--device Print device ID number to which each file belongs.
37+
-q # 用“?”号取代控制字符,列出文件和目录名称。
38+
-N # 直接列出文件和目录名称,包括控制字符。
39+
-Q # Quote filenames with double quotes.
40+
-p # 列出权限标示。
41+
-u # 列出文件或目录的拥有者名称,没有对应的名称时,则显示用户识别码。
42+
-g # 列出文件或目录的所属群组名称,没有对应的名称时,则显示群组识别码。
43+
-s # 列出文件和目录大小。
44+
-h # Print the size in a more human readable way.
45+
--si # Like -h, but use in SI units (powers of 1000).
46+
-D # 列出文件或目录的更改时间。
47+
-F # 在执行文件,目录,Socket,符号连接,管道名称名称,各自加上"*","/","@","|"号。
48+
--inodes # Print inode number of each file.
49+
--device # Print device ID number to which each file belongs.
5050
------- 排序选项 -------
51-
-v Sort files alphanumerically by version.
52-
-t 用文件和目录的更改时间排序。
53-
-c Sort files by last status change time.
54-
-U Leave files unsorted.
55-
-r Reverse the order of the sort.
56-
--dirsfirst List directories before files (-U disables).
57-
--sort X Select sort: name,version,size,mtime,ctime.
51+
-v # Sort files alphanumerically by version.
52+
-t # 用文件和目录的更改时间排序。
53+
-c # Sort files by last status change time.
54+
-U # Leave files unsorted.
55+
-r # Reverse the order of the sort.
56+
--dirsfirst # List directories before files (-U disables).
57+
--sort X # Select sort: name,version,size,mtime,ctime.
5858
------- 图形选项 ------
59-
-i 不以阶梯状列出文件和目录名称。
60-
-A 使用ASNI绘图字符显示树状图而非以ASCII字符组合。
61-
-S Print with CP437 (console) graphics indentation lines.
62-
-n Turn colorization off always (-C overrides).
63-
-C 在文件和目录清单加上色彩,便于区分各种类型。
59+
-i # 不以阶梯状列出文件和目录名称。
60+
-A # 使用ASNI绘图字符显示树状图而非以ASCII字符组合。
61+
-S # Print with CP437 (console) graphics indentation lines.
62+
-n # Turn colorization off always (-C overrides).
63+
-C # 在文件和目录清单加上色彩,便于区分各种类型。
6464
------- XML / HTML / JSON选项 -------
65-
-X Prints out an XML representation of the tree.
66-
-J Prints out an JSON representation of the tree.
67-
-H baseHREF Prints out HTML format with baseHREF as top directory.
68-
-T string Replace the default HTML title and H1 header with string.
69-
--nolinks Turn off hyperlinks in HTML output.
65+
-X # Prints out an XML representation of the tree.
66+
-J # Prints out an JSON representation of the tree.
67+
-H baseHREF # Prints out HTML format with baseHREF as top directory.
68+
-T string # Replace the default HTML title and H1 header with string.
69+
--nolinks # Turn off hyperlinks in HTML output.
7070
---- 杂项选项 ----
71-
--version 输入版本信息。
72-
--help 打印使用帮助信息。
73-
-- Options processing terminator.
71+
--version # 输入版本信息。
72+
--help # 打印使用帮助信息。
73+
-- # Options processing terminator.
7474
```
7575

7676
### 参数

0 commit comments

Comments
 (0)