提交 c985d791 编写于 作者: F feilong

修正gml

上级 66803751
......@@ -10,18 +10,21 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_01.png)
<br/>
<br/>
登陆后如图所示,如果在移动端安装了CSDN App,也可以通过 CSDN App 扫码登陆:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_02.png)
<br/>
<br/>
点击右上角的用户头像图标,在下拉菜单里点击“个人主页”,进入你的GitCode个人主页:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_03.png)
<br/>
<br/>
**第2步:创建一个Git仓库**
......@@ -35,12 +38,14 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_04.png)
<br/>
<br/>
选择创建空白项目如图所示:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_05.png)
<br/>
<br/>
......@@ -48,12 +53,14 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_06.png)
<br/>
<br/>
点击“新建项目”后,如图所示:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_07.png)
<br/>
<br/>
**第3步:使用Git命令克隆仓库到本机**
......@@ -66,36 +73,42 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_08.png)
<br/>
<br/>
如图所示,在本机打开“终端”,输入命令`pwd`,并回车,查看当前终端环境下的工作目录位置,下图显示当前目录在Mac系统个人用户目录下。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_09.png)
<br/>
<br/>
如图所示,我们希望将终端环境的工作目录切换到桌面。输入命令`cd /Users/feilong/Desktop`,并回车,进入到桌面。再次输入`pwd`并回车可以看到工作目录已经切换到了桌面。(注意这里的"feilong"应该替换为你自己的Mac系统用户名)
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_10.png)
<br/>
<br/>
如图所示,现在我们使用 Git 命令来克隆前一节创建的 Git 仓库。输入命令`git clone https://gitcode.net/huanhuilong/hello_git.git`,并回车。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_11.png)
<br/>
<br/>
如图所示,Git 会将在GitCode上创建的仓库克隆到本机:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_12.png)
<br/>
<br/>
如图所示,此时Mac电脑的桌面上已经有了"hello_git"这个目录:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/gitcode_13.png)
<br/>
<br/>
**第4步:请回答问题**:
......
......@@ -5,60 +5,70 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_01.png)
<br/>
<br/>
如图所示,在`test.md`里编辑几行MarkDown文本(MarkDown语法请学习本技能树第二章),并保存。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_02.png)
<br/>
<br/>
如图所示,点击VSCode左侧的“Git面板按钮”,切换左侧导航栏。可以看到按钮上也显示里一个数字1,表示有一个文件发生变动。这里是新增了一个test.md文件。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_03.png)
<br/>
<br/>
如图所示,在“源代码管理”下的输入框里输入一个提交信息,这里输入“第一次提交”。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_04.png)
<br/>
<br/>
如图所示,在打勾图标的“提交”按钮,将文件的变动提交到Git本地。注意这里的提交只是将变动的文件提交到Git的本地索引系统里,还并不是提交到Git远程仓库。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_05.png)
<br/>
<br/>
如图所示,弹框会提示你还没有可提交到暂存更改。这是由于将文件变动提交到Git本地索引是需要两个步骤的,先将文件变动加入到暂存更改,再将暂存更改提交到Git本地索引。这里只需要点击「是」,VSCode会自动把两个步骤都做掉。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_06.png)
<br/>
<br/>
如图所示,提交后,VSCode左侧按钮栏的“Git面板按钮”上的数字消失了。我们希望将本地修改推送到GitCode的远程仓库。但是GitCode仓库上,仓库的其他成员可能也添加了文件,因此一般需要在推送前先拉取下变动到本机,如果拉取的过程中远程仓库的文件和本地的文件有冲突,则需要解决冲突,如何解决冲突不在本节考虑的范围。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_10.png)
<br/>
<br/>
如图所示,我们进一步点击下来菜单,点击“推送”按钮,将Git仓库的本地索引变动推送到GitCode上的远程仓库。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_07.png)
<br/>
<br/>
如图所示,Mac系统可能会提示你输入GitCode仓库的用户名密码,或者之前已经配置过,但是首次推送也会提示是否允许使用。根据提示做相应的授权即可。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_08.png)
<br/>
<br/>
如图所示,推送成功后,打开GitCode的 hello_git 仓库,可以看到新增的doc/test.md文件已经提交到仓库。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/first_commit_09.png)
<br/>
<br/>
经过这些操作,你已经学会了在VSCode里给Git仓库添加文件,提交到Git本地索引,拉取远程Git仓库变动到本机,再推送本地Git仓库的变动到远程仓库。以下描述错误的是?
......
......@@ -8,6 +8,7 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/install_git_01.png)
<br/>
**第二步,请执行以操作安装Mac下的包管理软件:`brew`。**
......@@ -23,12 +24,14 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/install_git_02.png)
<br/>
<br/>
安装成功后,如图所示:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/install_git_03.png)
<br/>
**第三步,请执行以操作,使用刚刚安装的 `brew` 来安装 `git` 的最新版本。**
......@@ -43,18 +46,21 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/install_git_04.png)
<br/>
<br/>
安装过程如图所示:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/install_git_05.png)
<br/>
<br/>
安装成功如图所示:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/install_git_06.png)
<br/>
<br/>
......
......@@ -17,30 +17,35 @@
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/vscode_01.png)
<br/>
<br/>
如图所示,安装code命令到终端:
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/vscode_02.png)
<br/>
<br/>
如图所示,在命令下使用`code .`命令打开仓库,这里的 `.` 表示当前目录。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/vscode_03.png)
<br/>
<br/>
如果所示,VSCode里打开了仓库目录,会提示是否信任目录,点击信任。
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/vscode_04.png)
<br/>
<br/>
如图所示,VSCode打开了 hello_git 仓库,点击“README.md”文件并显示
<br/>
![](https://gitcode.net/csdn/skill_tree_git_md_linux/-/raw/master/data/1.gml%E5%88%9D%E9%98%B6/1.Git%E5%85%A5%E9%97%A8/7.%E6%9E%81%E7%AE%80Git+VSCode(Mac)/img/vscode_05.png)
<br/>
<br/>
经过上述操作,你已经学会安装VSCode并打开Git仓库了,以下描述错误的是?
......
......@@ -10,32 +10,40 @@
<br/>
![](./img/vscode_01.png)
<br/>
<br/>
如图所示,安装 vscode:
<br/>
![](./img/vscode_01.1.png)
<br/>
![](./img/vscode_01.2.png)
<br/>
![](./img/vscode_01.3.png)
<br/>
![](./img/vscode_01.4.png)
<br/>
![](./img/vscode_01.5.png)
<br/>
<br/>
如果所示,VSCode里打开了仓库目录(如提示是否信任目录,点击信任)
<br/>
![](./img/vscode_02.png)
<br/>
<br/>
如图所示,VSCode打开了 hello_git 仓库,点击“README.md”文件并显示
<br/>
![](./img/vscode_03.png)
<br/>
<br/>
经过上述操作,你已经学会安装VSCode并打开Git仓库了,以下描述错误的是?
......
......@@ -22,6 +22,7 @@
```bash
![](/path/to/img.jpg)
<br/>
```
### C
......
......@@ -3,14 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"命令"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "命令"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2673",
"task_id_info": {
"course_id": 36675,
"task_id": 2673
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "14c678ed4c54407da82e9e2d6947cb4c"
"exercise_id": "ba91eb3418d24043b011add17d5315b4"
}
\ No newline at end of file
# 实战:初识Linux
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2673),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下对登陆信息含义描述错误的是?
登陆信息:
```bash
# csdn @ edu in ~ [18:47:27]
$
```
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "ba91eb3418d24043b011add17d5315b4"
}
\ No newline at end of file
# 复习:初识Linux
* 通过实战练习,你已经掌握了相关知识,以下对登陆信息含义描述错误的是?
登陆信息:
```bash
# csdn @ edu in ~ [18:47:27]
$
```
## 答案
```bash
$: 命令提示符. 如果是root用户则提示符是¥;
```
## 选项
### A
```bash
$: 命令提示符. 如果是root用户则提示符是#;
```
### B
```bash
@: 分隔符.
```
### C
```bash
csdn: 表示当前的登陆用户,这里是使用csdn账户登陆.
```
### D
```bash
edu: 主机短名称
```
### E
```bash
~: 当前所在目录
```
### F
```bash
在Linux系统中, 最重要的就是命令, 而每个命令执行必然有两步: 输入和输出.
```
......@@ -3,15 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"查看",
"文件"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "查看", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2682",
"task_id_info": {
"course_id": 36675,
"task_id": 2682
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "d800ae6843874bb7af60d313a3ec3376"
"exercise_id": "9d99e9d47a234651824c90e117668f91"
}
\ No newline at end of file
# 实战:如何查看文件全部内容
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2682),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "9d99e9d47a234651824c90e117668f91"
}
\ No newline at end of file
# 复习:如何查看文件全部内容
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:cat -n /etc/hosts
可以看到 hosts 文件中含有'127.0.0.1 localhost'这行
```
## 选项
### A
```bash
执行命令:cp /etc/hosts hosts
执行命令:cat hosts
可以看到 hosts 文件中含有'127.0.0.1 localhost'这行
```
### B
```bash
执行命令:cp /etc/hosts hosts
执行命令:cat -n hosts
可以看到 hosts 文件中含有'2 127.0.0.1 localhost'这行
```
### C
```bash
执行命令:cat /etc/hosts
可以看到 hosts 文件中含有'127.0.0.1 localhost'这行
```
......@@ -3,16 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"长",
"文件",
"查看"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "长", "文件", "查看"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2683",
"task_id_info": {
"course_id": 36675,
"task_id": 2683
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "07092828054a4bb68d9326b8fbb86a88"
"exercise_id": "37859717499c41cf89fd2dad4a01e6f3"
}
\ No newline at end of file
# 实战:长内容的文件查看方式
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2683),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "37859717499c41cf89fd2dad4a01e6f3"
}
\ No newline at end of file
# 复习:长内容的文件查看方式
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
有一个程序从1开始一直往1.log文件里,每隔1秒按行插入序号到文件1.log
执行命令:`head -h 1.log`
那么可以看到屏幕每隔1秒会显示一行新的序号
```
## 选项
### A
```bash
执行命令:`head /etc/hosts` 可以查看文件的前10行文本
执行命令:`tail /etc/hosts` 可以查看文件的尾巴10行文本
```
### B
```bash
有一个程序从1开始一直往1.log文件里,每隔1秒按行写入序号
执行命令:`tail -f 1.log`
那么可以看到屏幕每隔1秒会显示一行新的序号
```
### C
```bash
执行命令:`tail /etc/hosts -n 2` 可以查看文件的尾巴2行文本
执行命令:`head /etc/hosts -n 2` 可以查看文件的前2行文本
```
......@@ -3,15 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"vi",
"编辑"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "vi", "编辑"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2684",
"task_id_info": {
"course_id": 36675,
"task_id": 2684
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "5a06c1c461e244e6b4e2bf3994a0e0ec"
"exercise_id": "ffae07c755b04b1d80f499060aa88197"
}
\ No newline at end of file
# 实战:使用vi简单的编辑文本
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2684),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "ffae07c755b04b1d80f499060aa88197"
}
\ No newline at end of file
# 复习:使用vi简单的编辑文本
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`touch 1.txt`
使用 `vi 1.txt` 打开文本文件
输入`i`键进入编辑模式
输入文本:hello
`ESC`键退出编辑模式
输入冒号按键:`:`,切换到vi的命令输入区
输入命令:`q` 退出编辑器
此时,文件 1.txt 里含有文本"hello"
```
## 选项
### A
```bash
使用 vi 打开文本文件后,
需要输入`a`或者`i`键才能进入编辑模式,输入文本到编辑器中
```
### B
```bash
使用 vi 编辑文本后,ESC退出编辑模式,
然后按冒号进入命令区
然后执行`w`可以保存文本
然后执行`q`可以退出vi编辑器
```
### C
```bash
执行命令:`touch 1.txt`
使用 `vi 1.txt` 打开文本文件
输入`i`键进入编辑模式
输入文本:hello
`ESC`键退出编辑模式
输入冒号按键:`:`,切换到vi的命令输入区
输入命令:`wq` 退出编辑器
此时,文件 1.txt 里含有文本"hello"
```
......@@ -3,15 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"查找",
"文件"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "查找", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2685",
"task_id_info": {
"course_id": 36675,
"task_id": 2685
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "dfacda4609694c53b825761015191f6f"
"exercise_id": "f20fa303de92484694b133aebad9113f"
}
\ No newline at end of file
# 实战:查找文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2685),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "f20fa303de92484694b133aebad9113f"
}
\ No newline at end of file
# 复习:查找文件
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`cd ..`
执行命令:`find test/ -name 1.txt -size 0M`
此时,会输出:
test/1.txt
```
## 选项
### A
```bash
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`cd ../../`
执行命令:`find test/ -name 1.txt -size 1M`
此时,会输出:
test/test/1.txt
test/1.txt
```
### B
```bash
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`cd ..`
执行命令:`find test/ -name 1.txt`
此时,会输出:
test/1.txt
```
### C
```bash
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`mkdir test`
执行命令:`cd test`
执行命令:`touch 1.txt`
执行命令:`cd ../../`
执行命令:`find test/ -name 1.txt`
此时,会输出:
test/test/1.txt
test/1.txt
```
......@@ -3,15 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"创建",
"快捷方式"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "创建", "快捷方式"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2686",
"task_id_info": {
"course_id": 36675,
"task_id": 2686
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "4d125700244c4dfd8d2791b43c578d3a"
"exercise_id": "f5bdbdd43d184f26a7783ca3f187070a"
}
\ No newline at end of file
# 实战:创建一个快捷方式
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2686),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "f5bdbdd43d184f26a7783ca3f187070a"
}
\ No newline at end of file
# 复习:创建一个快捷方式
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`touch 1.txt`
使用`vi 1.txt`编辑并输入"hello",然后保存退出
执行命令:`ln -s 1.txt 2.txt`
执行命令:`rm 1.txt`
执行命令:`cat 2.txt`
此时,输出:hello
```
## 选项
### A
```bash
执行命令:`touch 1.txt`
使用`vi 1.txt`编辑并输入"hello",然后保存退出
执行命令:`ln 1.txt 2.txt`
执行命令:`rm 1.txt`
执行命令:`cat 2.txt`
此时,输出:hello
```
### B
```bash
执行命令:`ln -s /usr /home/csdn/myusr`
执行命令:`rm /home/csdn/myusr`
执行命令:`ln -s /usr /home/csdn/myusr`
会在/home/csdn/目录下创建一个myusr的软链接
该软链接指向 /usr 目录
```
### C
```bash
执行命令:`ln -s /usr /home/csdn/myusr`
会在/home/csdn/目录下创建一个myusr的软链接
该软链接指向 /usr 目录
```
......@@ -3,17 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
"exercise_01.json"
],
"keywords_must": [
[
"Linux",
"压缩",
"文件"
]
],
"keywords_forbid": [
"解压"
]
"keywords_must": [["Linux", "压缩", "文件"]],
"keywords_forbid": ["解压"]
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2687",
"task_id_info": {
"course_id": 36675,
"task_id": 2687
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "a869a271f0634dcf8c1278fd4ec596df"
"exercise_id": "1d52581f0b8a44e3acb757678bb98e10"
}
\ No newline at end of file
# 实战:压缩一个文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2687),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "1d52581f0b8a44e3acb757678bb98e10"
}
\ No newline at end of file
# 复习:压缩一个文件
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`touch 1.txt`
执行命令:`zip 1.txt`
此时,生产了一个`1.txt.zip`压缩包文件
```
## 选项
### A
```bash
执行命令:`touch 1.txt`
执行命令:`tar -cvzf 1.tar 1.txt`
此时,生产了一个`1.tar`压缩包文件
```
### B
```bash
执行命令:`touch 1.txt`
执行命令:`tar -cvzf 1.tar.gz 1.txt`
此时,生产了一个`1.tar.gz`压缩包文件
```
### C
```bash
执行命令:`touch 1.txt`
执行命令:`gzip 1.txt`
此时,生产了一个`1.txt.gz`压缩包文件
```
......@@ -3,15 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"解压",
"文件"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "解压", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2688",
"task_id_info": {
"course_id": 36675,
"task_id": 2688
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "89359b7e51a547a9a65189da3b52ed7b"
"exercise_id": "a92c84137ec24f0fa562c91bee8b7096"
}
\ No newline at end of file
# 实战:解压缩一个文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2688),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "a92c84137ec24f0fa562c91bee8b7096"
}
\ No newline at end of file
# 复习:解压缩一个文件
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`touch 1.txt`
执行命令:`gunzip 1.txt`
执行命令:`gunzip -d 1.txt`
此时目录下:
* 不存在文件 1.txt.gz
* 存在文件 1.txt
```
## 选项
### A
```bash
执行命令:`touch 1.txt`
执行命令:`gzip 1.txt`
执行命令:`gunzip 1.txt`
此时目录下:
* 不存在文件 1.txt.gz
* 存在文件 1.txt
```
### B
```bash
执行命令:`touch 1.txt`
执行命令:`gzip 1.txt`
执行命令:`gzip -d 1.txt`
此时目录下:
* 不存在文件 1.txt.gz
* 存在文件 1.txt
```
### C
```bash
执行命令:`touch 1.txt`
执行命令:`gzip 1.txt`
此时目录下:
* 存在文件 1.txt.gz
* 不存在文件 1.txt
```
......@@ -3,14 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"安装"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "安装"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2689",
"task_id_info": {
"course_id": 36675,
"task_id": 2689
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "7aa2cedc8a464055802ea84ea390d1a2"
"exercise_id": "f86f96f6f5594a81822c9c689f46a6a6"
}
\ No newline at end of file
# 实战:在线安装软件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2689),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "f86f96f6f5594a81822c9c689f46a6a6"
}
\ No newline at end of file
# 复习:在线安装软件
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
在Windows系统上执行命令:`biergaici install tree`
然后执行:`tree /home`
可以输出 home/ 目录的目录树结构
```
## 选项
### A
```bash
Mac系统上如果预装了包管理命令`brew`
在Mac系统上执行命令:`sudo brew install tree`
然后执行:`tree home/`
可以输出 home/ 目录的目录树结构
```
### B
```bash
在Ubuntu系统上执行命令:`sudo apt-get install tree`
然后执行:`tree home/`
可以输出 home/ 目录的目录树结构
```
### C
```bash
在CentOS系统上执行命令:`sudo yum install tree`
然后执行:`tree /home`
可以输出 /home 目录的目录树结构
```
......@@ -3,15 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"效率",
"技巧"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "效率", "技巧"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2690",
"task_id_info": {
"course_id": 36675,
"task_id": 2690
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "0949daa703b64ebeb2c95e1754e48aa7"
"exercise_id": "d56da15acdc74b648fd90b0b39edd28a"
}
\ No newline at end of file
# 实战:提升效率的一些技巧
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2690),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "d56da15acdc74b648fd90b0b39edd28a"
}
\ No newline at end of file
# 复习:提升效率的一些技巧
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
history命令就是查看当前用户下所以有历史执行命令。
因此在Linux下输入命令的时候,在命令行参数里直接指定密码是安全的行为。
```
## 选项
### A
```bash
上下翻页键可以直接回显最近执行的一条命令。
```
### B
```bash
history命令就是查看当前用户下所以有历史执行命令。
因此在Linux下输入命令的时候,在命令行参数里直接指定密码是不安全的行为。
```
### C
```bash
[tab]热键是Linux bash shell中最最常用的键了。
它具有补全命令和文件补全的功能。
```
......@@ -3,14 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"基础命令"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "基础命令"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2691",
"task_id_info": {
"course_id": 36675,
"task_id": 2691
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "f8603e6e7ee1408f81fcf570425a310e"
"exercise_id": "5a9951c0498b4b418b1944ae3925bb14"
}
\ No newline at end of file
# 实战:Linux基础命令汇总
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2691),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "5a9951c0498b4b418b1944ae3925bb14"
}
\ No newline at end of file
# 复习:Linux基础命令汇总
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
Linux 命令有一大类是用来变魔法的
例如:Anti-Apparition Charm,Beauty spell,Bedazzling Hex
```
## 选项
### A
```bash
Linux 命令有一大类是用来创建文件和文件夹的,
例如:touch, mkdir, ln
```
### B
```bash
Linux 命令有一大类是用来移动文件的,
例如:cp,mv
```
### C
```bash
Linux 命令有一大类是用来查看文件的,
例如:cat, head, tail
```
### D
```bash
Linux 命令有一大类是用来删除文件和文件夹的,
例如:rm, rmdir
```
### E
```bash
Linux 命令有一大类是用来编辑文件的,
例如:vi, vim
```
### F
```bash
Linux 每个平台都有对应包管理器,用来安装/卸载新包和命令,
例如:yum, apt-get
```
......@@ -3,17 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
"exercise_01.json"
],
"keywords_must": [
[
"Linux",
"创建",
"目录"
]
],
"keywords_forbid": [
"删除"
]
"keywords_must": [["Linux", "创建", "目录"]],
"keywords_forbid": ["删除"]
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2674",
"task_id_info": {
"course_id": 36675,
"task_id": 2674
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "837e9fe0657d461c898e03faa8ca31a7"
"exercise_id": "ec52393cb69b47f8a02ace9564551c8d"
}
\ No newline at end of file
# 实战:创建一个目录
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2674),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "ec52393cb69b47f8a02ace9564551c8d"
}
\ No newline at end of file
# 复习:创建一个目录
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
创建doc目录的命令是:`makedir doc`
```
## 选项
### A
```bash
在Linux下权限是极其严格的,如果不在home目录下,
是没有权限创建目录的.
```
### B
```bash
创建doc目录的命令是:`mkdir doc`
```
### C
```bash
切换当前目录到var目录的命令是: `cd /var`
```
......@@ -3,14 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"入门"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "入门"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2692",
"task_id_info": {
"course_id": 36675,
"task_id": 2692
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "af17e602675546b29b11a7c5b760a7da"
"exercise_id": "a567f4bf1b1a491c8f556106ca15cf0a"
}
\ No newline at end of file
# 实战:Linux入门总结
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2692),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "a567f4bf1b1a491c8f556106ca15cf0a"
}
\ No newline at end of file
# 复习:Linux入门总结
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
Linux Shell环境只能使用命令,不能编程
```
## 选项
### A
```bash
使用Linux命令还可以对系统和系统日志进行维护
```
### B
```bash
使用Linux命令还可以对磁盘管理
```
### C
```bash
Linux命令还可以对用户文件系统进行权限管理
```
......@@ -4,31 +4,10 @@
"安装Ubuntu",
"安装CentOS"
],
"keywords_must": [
[
"Ubuntu",
"操作系统",
"安装"
],
[
"CentOS",
"操作系统",
"安装"
],
[
"Debian",
"操作系统",
"安装"
],
[
"RedHat",
"操作系统",
"安装"
]
],
"keywords_must": [["Ubuntu", "操作系统", "安装"], ["CentOS", "操作系统", "安装"], ["Debian", "操作系统", "安装"], ["RedHat", "操作系统", "安装"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
"exercise_01.json"
]
}
\ No newline at end of file
......@@ -3,17 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
"exercise_01.json"
],
"keywords_must": [
[
"Linux",
"创建",
"文件"
]
],
"keywords_forbid": [
"删除"
]
"keywords_must": [["Linux", "创建", "文件"]],
"keywords_forbid": ["删除"]
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2675",
"task_id_info": {
"course_id": 36675,
"task_id": 2675
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "f4eee7074d7b4685adea92c1ce23d0d3"
"exercise_id": "e1f216b894d244a2a9f461933a8cf5ed"
}
\ No newline at end of file
# 实战:创建一个空白文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2675),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "e1f216b894d244a2a9f461933a8cf5ed"
}
\ No newline at end of file
# 复习:创建一个空白文件
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
如果文件 `hello.txt` 已存在
命令 `touch hello.txt` 会创建一个空白的`hello.txt`文件
并且覆盖了原来的`hello.txt`文件
```
## 选项
### A
```bash
如果 cd /home/csdn/doc 失败,会提示:
cd: no such file or directory: /home/csdn/doc
此时可以先 cd /home/csdn
再执行 mkdir doc 先创建目录
```
### B
```bash
命令 `touch` 用来创建一个空白文件,但如果文件已存在,则会更新时间.
```
### C
```bash
如果文件 `hello.txt` 不存在
命令 `touch hello.txt` 会创建一个空白的`hello.txt`文件
```
......@@ -3,14 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"路径"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "路径"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2676",
"task_id_info": {
"course_id": 36675,
"task_id": 2676
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "457fdd493c1e4e27bb7bcfd348a1e1ae"
"exercise_id": "e704fc7244814225b5b3db2aae0d9fd7"
}
\ No newline at end of file
# 实战:认识路径的概念
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2676),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "e704fc7244814225b5b3db2aae0d9fd7"
}
\ No newline at end of file
# 复习:认识路径的概念
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
假设当前在 /home/csdn/doc 目录
命令 `cd .` 可以进入 /home/csdn 目录
```
## 选项
### A
```bash
在对 Linux 目录操作过程中
可以使用 pwd 命令查看当前所处目录的绝对路径
```
### B
```bash
假设目录 /home/csdn/doc 存在
命令 `cd /home/csdn/doc` 可以从任何位置切换到doc目录
```
### C
```bash
假设当前在 /home/csdn/doc 目录
命令 `cd ..` 可以进入 /home/csdn 目录
```
......@@ -3,15 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"删除",
"文件"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "删除", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2677",
"task_id_info": {
"course_id": 36675,
"task_id": 2677
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "3e7c7569b1da47549578775eeb673767"
"exercise_id": "97f1925d8bcb4bc6a3fab4a9189a47f6"
}
\ No newline at end of file
# 实战:删除一个文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2677),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "97f1925d8bcb4bc6a3fab4a9189a47f6"
}
\ No newline at end of file
# 复习:删除一个文件
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`touch test1.txt`
执行命令:`touch test2.txt`
接着执行命令:`rm test2.txt`
此时,文件`test1.txt`已经被删除
```
## 选项
### A
```bash
执行命令:`touch test.txt`
接着执行命令:`rm test.txt`
此时,文件`test.txt`已经被删除
```
### B
```bash
执行命令:`touch test.txt`
接着执行命令:`rm test.txt`
接着执行命令:`touch test.txt`
此时,文件`test.txt`存在
```
### C
```bash
执行命令:`touch test1.txt`
执行命令:`touch test2.txt`
接着执行命令:`rm test1.txt`
此时,文件`test2.txt`存在
```
......@@ -3,17 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
"exercise_01.json"
],
"keywords_must": [
[
"Linux",
"删除",
"目录"
]
],
"keywords_forbid": [
"创建"
]
"keywords_must": [["Linux", "删除", "目录"]],
"keywords_forbid": ["创建"]
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2678",
"task_id_info": {
"course_id": 36675,
"task_id": 2678
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "c42427359f5f473499ba27c703e32624"
"exercise_id": "efb3d5704b8f4aaf808715c446f65d6d"
}
\ No newline at end of file
# 实战:删除目录
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2678),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "efb3d5704b8f4aaf808715c446f65d6d"
}
\ No newline at end of file
# 复习:删除目录
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`mkdir test`
执行命令:`rm -f test`
则目录 test 先被创建,接着被删除
```
## 选项
### A
```bash
执行命令:`mkdir test`
执行命令:`rmdir test`
则目录 test 先被创建,接着被删除
```
### B
```bash
执行命令:`mkdir test`
执行命令:`rm -d test`
则目录 test 先被创建,接着被删除
```
### C
```bash
命令 `rmdir` 和 命令 `rm -d` 都可以用来删除目录
```
......@@ -3,20 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"复制",
"目录"
],
[
"Linux",
"复制",
"文件"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "复制", "目录"], ["Linux", "复制", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2679",
"task_id_info": {
"course_id": 36675,
"task_id": 2679
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "b7ed682ab29745a58b9cb4fe09c38082"
"exercise_id": "a302203baa2c4850830d2727d24af8c9"
}
\ No newline at end of file
# 实战:复制目录和文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2679),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
{
"type": "code_options",
"author": "csdn.net",
"source": "exercise_02.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "a302203baa2c4850830d2727d24af8c9"
}
\ No newline at end of file
# 复习:复制目录和文件
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:mkdir test
执行命令:cd test
执行命令:touch 1.txt
执行命令:cd ..
执行命令:cp test test2
此时,存在文件 test2/1.txt
```
## 选项
### A
```bash
执行命令:mkdir test
执行命令:cd test
执行命令:touch 1.txt
执行命令:cd ..
执行命令:cp -r test test2
此时,存在文件 test2/1.txt
```
### B
```bash
执行命令:touch 1.txt
执行命令:cp 1.txt 2.txt
此时,存在文件 2.txt
```
### C
```bash
执行命令:touch 1.txt
执行命令:cp -r 1.txt 3.txt
此时,存在文件 3.txt
```
......@@ -3,20 +3,8 @@
"keywords": [],
"children": [],
"export": [
"exercise_01.json",
"exercise_02.json"
],
"keywords_must": [
[
"Linux",
"移动",
"目录"
],
[
"Linux",
"移动",
"文件"
]
"exercise_01.json"
],
"keywords_must": [["Linux", "移动", "目录"], ["Linux", "移动", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "edu_task",
"type": "task_edu",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2680",
"task_id_info": {
"course_id": 36675,
"task_id": 2680
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "e1c5244d1bd94ffa8c130af0bccff45a"
"exercise_id": "ea4322f2fe8644c39c90571979d0b9cd"
}
\ No newline at end of file
# 实战:移动目录和文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2680),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册