File tree 7 files changed +99
-1
lines changed
7 files changed +99
-1
lines changed Original file line number Diff line number Diff line change 9
9
display : block;
10
10
margin-left : auto;
11
11
margin-right : auto
12
+ }
13
+
14
+ .avatar {
15
+ height : 128px !important ;
12
16
}
Original file line number Diff line number Diff line change
1
+ # cd 命令 – 切换目录
2
+
3
+ ## 命令详解
4
+
5
+ ``` bash
6
+ cd path
7
+ ```
8
+
9
+ 来自英文词组 ` change directory ` 的缩写,其功能是更改当前所处的工作目录,路径可以是绝对路径,也可以是相对路径,若省略不写则会跳转至当前使用者的家目录。
10
+
11
+ | 参数 | 注释 |
12
+ | ---- | ---------------------------- |
13
+ | -L | 切换至符号链接所在的目录 |
14
+ | -P | 切换至符号链接对应的实际目录 |
15
+ | ~ | 切换至用户家目录 |
16
+ | .. | 切换至当前位置的上一级目录 |
17
+
18
+ ## 实例
19
+
20
+ !!! example "范例 1"
21
+
22
+ 执行以下命令可以进入当前目录下名为 `MyFolder` 的文件夹。
23
+ ```bash
24
+ [lug@litwiki ~]# cd ./MyFolder
25
+ ```
26
+
27
+ 执行以下命令可以进入系统根目录。
28
+ ```bash
29
+ [lug@litwiki ~]# cd /
30
+ ```
31
+
32
+ 执行以下命令可以进入当前用户主目录。
33
+ ```bash
34
+ [lug@litwiki ~]# cd ~
35
+ ```
Original file line number Diff line number Diff line change
1
+ # mkdir 命令 – 新建目录
2
+
3
+ ## 命令详解
4
+
5
+ ``` bash
6
+ mkdir [-p] path
7
+ ```
8
+
9
+ 来自英文词组 ` make directory ` 的缩写,其功能是新建一个目录。
10
+
11
+ | 参数 | 注释 |
12
+ | ---- | ------------------------------------ |
13
+ | -p | 确保路径中的所有路径存在,如无则创建 |
14
+
15
+ ## 实例
16
+
17
+ !!! example "范例 1"
18
+
19
+ 执行以下命令可以在当前目录新建一个名为 `MyFolder` 的文件夹。
20
+ ```bash
21
+ [lug@litwiki ~]# mkdir ./MyFolder
22
+ ```
23
+
24
+ !!! example "范例 2"
25
+
26
+ 执行以下命令可以在当前目录新建一个名为 `Folder1` 的文件夹,并在其中新建一个名为 `MyFolder` 的文件夹
27
+
28
+ :fontawesome-solid-circle-xmark:{: .orangered } **错误**格式:
29
+ ```bash
30
+ [lug@litwiki ~]# mkdir ./Folder1/MyFolder
31
+ ```
32
+ 因为 `Folder1` 目录不存在,无法执行并报错
33
+
34
+ :fontawesome-solid-circle-check:{: .limegreen } **正确**格式:
35
+ ```bash
36
+ [lug@litwiki ~]# mkdir -p ./Folder1/MyFolder
37
+ ```
38
+ 此时若 `Folder1` 不存在,将会新建 `Folder1` 后再在其中新建 `MyFolder` 目录
Original file line number Diff line number Diff line change @@ -17,3 +17,11 @@ title: 欢迎
17
17
!!! tip "本 Wiki 部分内容摘录自 Wikipedia 和 《Linux 101》,摘录部分根据原共享协议共享"
18
18
19
19
!!! tip "本 Wiki 非特殊标识内容均采用 CC BY-SA 4.0 协议共享"
20
+
21
+ ## 成员
22
+
23
+ ** LUG@Lit** 及 Wiki 由以下成员维护
24
+
25
+ | ![ ] ( https://yurik.cafe/favicon/v2/[email protected] ) {.avatar}
| ![ ] ( https://norph1n.top/usr/themes/Kratos/images/author.jpg ) {.avatar}
|
26
+ | ----------------------------------------------------------- | --------------------------------------------------------------------- |
27
+ | 景蓝 Yurik | Norph1n |
Original file line number Diff line number Diff line change 153
153
3 . 在你 Fork 后的仓库中进行修改
154
154
4 . 提交 Pull Requests 并等待合并
155
155
5 . 完成
156
+
157
+ ## 更多自有样式
158
+
159
+ 如果你发现自己使用 Markdown 语法无法实现与其他文章一样的效果,不妨查看一下那篇文章的源代码或使用 ` F12 ` 打开开发者工具来了解更多。
160
+
161
+ !!! quote "Yurik 碎碎念"
162
+
163
+ 我们很推荐你在不会使用效果时直接复制你想参考的区块,这很方便。
Original file line number Diff line number Diff line change @@ -40,12 +40,16 @@ markdown_extensions:
40
40
permalink : true
41
41
42
42
nav :
43
+ - 欢迎 : index.md
43
44
- 指南与规则 :
44
45
- 格式风格 : rules/styleguide.md
45
- - 欢迎 : index.md
46
46
- Linux 简介 :
47
47
- linux-intro/index.md
48
48
- Linux 发行版 : linux-intro/linux-distribution/index.md
49
+ - 命令与注释 :
50
+ - 文件管理 :
51
+ - mkdir 新建文件夹 : command/file/mkdir.md
52
+ - cd 切换目录 : command/file/cd.md
49
53
50
54
extra_css :
51
55
- " assets/css/extra-color.css"
Original file line number Diff line number Diff line change
1
+ mkdocs serve
You can’t perform that action at this time.
0 commit comments