提交 1f01967b 编写于 作者: ccat's avatar ccat

Merge branch 'master' into 'uniform'

# Conflicts:
#   .pre-commit-config.yaml
#   main.py
#   requirements.txt
......@@ -4,4 +4,5 @@
__pycache__
*.pyc
*.zip
*.out
\ No newline at end of file
*.out
*.pdf
\ No newline at end of file
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/1/1",
"task_id_info": {
"course_id": 1,
"task_id": 1
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "399ebefcdd3444d4a99c140527c8d98d",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/1/2",
"task_id_info": {
"course_id": 1,
"task_id": 2
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "2c2b3735973143c7a001d0f550a9b9c6",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/1/3",
"task_id_info": {
"course_id": 1,
"task_id": 3
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "ec97e801f80f47e3a8218f511f9ecd06",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/1/4",
"task_id_info": {
"course_id": 1,
"task_id": 4
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "f8a64858e47e4504989c3b33ba9b11e0",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/1/5",
"task_id_info": {
"course_id": 1,
"task_id": 5
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "5591a41efbc049f3ba57daeaf24e2001",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/1/6",
"task_id_info": {
"course_id": 1,
"task_id": 6
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "8694fd578817477d8b699cfa801dedc2",
......
{
"node_id": "gml-23b8a7b7033540e388c911bb0298aa7b",
"keywords": [
"VSCode配置Git"
],
"keywords_must": [
[
"VSCode",
"Git",
"Mac"
]
],
"keywords_forbid": [],
"export": [
"install_git.json",
"create_repo.json",
"install_vscode.json",
"first_commit.json"
]
}
\ No newline at end of file
{
"type": "code_options",
"author": "huanhuilong",
"source": "create_repo.md",
"notebook_enable": false,
"exercise_id": "8dabd23113cd4fc6ab2903d66dcc7612"
}
\ No newline at end of file
# 极简 Git+VSCode for Mac(2): 在GitCode上创建一个Git仓库
**第1步:登陆GitCode**
1. GitCode 是CSDN官方的Git代码仓库中心,网站地址是: https://gitcode.net
2. GitCod 的登陆账号就是你的 CSDN 账号。
3. 请使用 CSDN 账号登陆 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_01.png)
<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/>
点击右上角的用户头像图标,在下拉菜单里点击“个人主页”,进入你的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/>
**第2步:创建一个Git仓库**
1. 在GitCode个人主页右上角,点击+号按钮,在下拉菜单里点击“新建项目”
2. 在新建项目页面里选择“创建空白项目”
3. 在“创建空白项目”配置页面填写“项目名称”,“项目描述”,并勾选“使用自述文件初始化仓库”
4. 最后点击“新建项目”,创建项目。
新建项目按钮如图所示:
<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/>
![](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/>
“创建空白项目”配置页面填写“项目名称”,“项目描述”,并勾选“使用自述文件初始化仓库”。例如这里第一个项目起名叫做“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_06.png)
<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/>
**第3步:使用Git命令克隆仓库到本机**
1. 在Git项目页面上拷贝仓库地址。
2. 在本机适用 Git 命令将仓库克隆下来。
如图所示,点击仓库页面上的“克隆”按钮,选择“通过 HTTPS 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_08.png)
<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/>
如图所示,我们希望将终端环境的工作目录切换到桌面。输入命令`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/>
如图所示,现在我们使用 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/>
如图所示,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/>
如图所示,此时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/>
**第4步:请回答问题**:
通过上面的几个步骤,你已经学会了如何在 GitCode 上创建一个Git仓库,并克隆到本机,以下描述错误的是?
## 答案
```bash
GitCode 不用登陆就可以创建Git仓库,并且会自动将Git仓库从远程克隆到本机。
```
## 选项
### A
```bash
GitCode 可以使用 CSDN 账号登陆。
```
### B
```bash
GitCode 上可以创建并托管一个Git仓库。
```
### C
```bash
GitCode 上创建Git仓库时,可以选择创建空白项目,并配置“项目名称”,“项目描述”,创建时可以勾选“使用自述文件初始化仓库”以简化仓库数据初始化。
```
### D
```bash
在Mac上的终端里可以使用命令`pwd`查看当前工作目录,使用`cd`命令可以切换当前工作目录到桌面。
```
### E
```bash
在Mac上的终端里可以使用`git clone`命令将Git仓库从远程克隆到本机。
```
{
"type": "code_options",
"author": "huanhuilong",
"source": "first_commit.md",
"notebook_enable": false,
"exercise_id": "bc1cb266f8fa4cffb74915cb88d5ce37"
}
\ No newline at end of file
# 极简 Git+VSCode for Mac(4): 使用VSCode添加MarkDown文件到Git仓库
如图所示,在VSCode的左侧导航列表里,使用右键菜单新建一个目录:doc,并在doc目录下新建一个MarkDown文件`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_01.png)
<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/>
如图所示,点击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/>
![](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/>
如图所示,在打勾图标的“提交”按钮,将文件的变动提交到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/>
如图所示,弹框会提示你还没有可提交到暂存更改。这是由于将文件变动提交到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/>
如图所示,提交后,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/>
如图所示,我们进一步点击下来菜单,点击“推送”按钮,将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/>
如图所示,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/>
如图所示,推送成功后,打开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/>
经过这些操作,你已经学会了在VSCode里给Git仓库添加文件,提交到Git本地索引,拉取远程Git仓库变动到本机,再推送本地Git仓库的变动到远程仓库。以下描述错误的是?
## 答案
```bash
Git仓库文件编辑后,提交变动到Git后,文件就已经推送到了远程仓库。
```
## 选项
### A
```bash
一般情况下推送数据到远程仓库之前,最好先拉取下远程仓库的变动到本地,可能的话需要解决冲突。
```
### B
```bash
VSCode 里文件变动后直接点提交实际上会提示你是否先将文件变动添加到Git的暂存区,再进一步将暂存区变动提交到Git本地索引。
```
### C
```bash
Git 仓库的文件发生变化后,VSCode左侧的Git面板按钮上会显示有变动的文件个数。
```
{
"type": "code_options",
"author": "huanhuilong",
"source": "install_git.md",
"notebook_enable": false,
"exercise_id": "9065f65a8ef44b56bb3e4a889563a419"
}
\ No newline at end of file
# 极简 Git+VSCode for Mac(1): 安装Git
**第一步,请执行以操作打开Mac下的终端。**
1. 点按程序坞中的“启动台”图标 ,在搜索栏中键入“终端”,然后点按“终端”。
2. 在“访达” 中,打开“/应用程序/实用工具”文件夹,然后连按“终端”。
3. 打开的“终端”一般如下图所示:
<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)
**第二步,请执行以操作安装Mac下的包管理软件:`brew`。**
简单介绍下`brew``brew`是一个包管理软件,用来安装、更新、卸载Mac上的其他工具包和库。
1. 拷贝命令:`/bin/bash -c "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
2. 在“终端”里粘贴
3. 回车执行,等待brew安装完成,有时候网络慢会等的旧一点,必要时请开VPN。
<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_02.png)
<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)
**第三步,请执行以操作,使用刚刚安装的 `brew` 来安装 `git` 的最新版本。**
1. 拷贝命令:`brew install git`
2. 在“终端”里粘贴
3. 回车执行,等待brew安装完git。
4. 安装成功后,关闭终端并重现打开。
5. 重新打开终端后,输入命令`git --version`并回车,查看git的最新版本号。
<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_04.png)
<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/>
![](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/>
好了,经过上述操作,你已经成功在Mac系统上使用终端安装了git的最新版本。以下说法错误的是?
## 答案
```bash
Mac下无法打开终端,Mac下的终端无法安装brew,Mac下的终端即使装了brew也不能使用brew安装git。
```
## 选项
### A
```bash
Mac的终端在“应用程序/实用工具”目录下。
```
### B
```bash
brew 是一个Mac的包管理软件,可以用来安装其他包和库。
```
### C
```bash
使用 brew 安装 git 的命令是: brew install git
```
### D
```bash
查看 git 版本号的命令是: git --version
```
{
"type": "code_options",
"author": "huanhuilong",
"source": "install_vscode.md",
"notebook_enable": false,
"exercise_id": "bd879ccdf1da4712b4839b7841ce4587"
}
\ No newline at end of file
# 极简 Git+VSCode for Mac(3): 安装VSCode并打开Git仓库
1. 打开 https://code.visualstudio.com/ 下载 VSCode Mac版
2. 解压 VSCode-darwin-universal.zip,得到 Visual Studio Code.app
3. 将 Visual Studio Code.app 拖放到 Mac 的“应用程序”里
4. 在应用程序里双击Visual Studio Code打开 VSCode
5. 在VSCode 里按快捷键“command+shift+p”
6. 在打开的输入框里输入 “shell command”
7. 点击下拉菜单:“Shell Command: install 'code' command in PATH”
8. 这样我们就在终端里安装了一个命令`code`,通过这个命令可以在终端里使用`code {dir}`来使用VSCode打开指定目录。
9. 例如打开Mac的终端,输入 `cd /Users/feilong/Desktop/hello_git` 进入到上一节克隆到本机的Git仓库目录。
10. 然后执行命令:`code .`,并回车,就会使用VSCode打开 hello_git 仓库目录。
11. 当然,也可以在打开VSCode后,通过菜单“文件->打开文件夹”的方式打开 hello_git 目录。取决于你更喜欢命令行还是GUI操作。
<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_01.png)
<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/>
如图所示,在命令下使用`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/>
如果所示,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/>
如图所示,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/>
经过上述操作,你已经学会安装VSCode并打开Git仓库了,以下描述错误的是?
## 答案
```bash
VSCode 只能通过菜单 文件->打开文件夹 来打开目标文件夹。
```
## 选项
### A
```bash
VSCode 可以通过菜单 文件->打开文件夹 来打开目标文件夹。
```
### B
```bash
VSCode 可以通过注册`code`命令到终端,在终端里使用`code {dir}` 的方式打开目录。
```
### C
```bash
VSCode 打开目录时候,如果需要提示是否信任,可以点击信任,因为这个目录就是你自己创建的,你决定信任这个文件夹。
```
### D
```bash
Mac下安装VSCode实际上就是把VSCode程序拷贝到Mac访达里的的“应用程序”下即可。
```
{
"node_id": "gml-0e1928df298a40fbbfc81e73809035ad",
"keywords": [
"VSCode配置Git"
],
"keywords_must": [
[
"VSCode",
"Git",
"Windows"
]
],
"keywords_forbid": [],
"children": [],
"export": []
}
\ No newline at end of file
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/1",
"task_id_info": {
"course_id": 2,
"task_id": 1
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "f033c7a4957a4f908f66f5a348274cde",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/2",
"task_id_info": {
"course_id": 2,
"task_id": 2
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "b03d2e4169a14e2599719ab881974c0a",
......
......@@ -31,5 +31,5 @@
```bash
段落的引用
强调的语法,包括 斜体 加粗 以及 删除线
强调的语法,包括 斜体 加粗 以及 下划线
```
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/3",
"task_id_info": {
"course_id": 2,
"task_id": 3
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "8844d2a58b3744a59f004d067e6ec935",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/4",
"task_id_info": {
"course_id": 2,
"task_id": 4
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "48621469905d49ce88133d7af94a3d70",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/5",
"task_id_info": {
"course_id": 2,
"task_id": 5
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "d2cf04bb0acc417995cb301f45da5eb3",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/6",
"task_id_info": {
"course_id": 2,
"task_id": 6
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "973934ecb71045beadcf4b5bd3778012",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/7",
"task_id_info": {
"course_id": 2,
"task_id": 7
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "ed154ec698ce462d9147c16a0bdf0139",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/8",
"task_id_info": {
"course_id": 2,
"task_id": 8
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "78ab9558c2cb42cabf233350b3ad2095",
......
{
"type": "code_options",
"type": "task_git_course",
"task_link": "https://codechina.csdn.net/courses/register/2/9",
"task_id_info": {
"course_id": 2,
"task_id": 9
},
"author": "csdn.net",
"source": "learn.md",
"exercise_id": "c028bd1229dd48aa90ce0987a9dd475d",
......
......@@ -7,11 +7,9 @@
## 答案
```bash
| header 1 |
header 2 | header 3 |
|:-------- | :------: | --------:|
| left-aligned 文本居左 | centered 文本居中 | right-aligned 文本居右 |
| `:---` 左侧冒号表示**内容和标题栏**居左对齐 | `:--:` 两端都有冒号表示**内容和标题栏**居中对齐 | `---:` 右侧冒号表示**内容和标题栏**居右对齐 |
| header 1 |header 2 | header 3 |
| 文本居左 | 文本居中 | 文本居右 |
| | | |
```
## 选项
......@@ -21,26 +19,26 @@
```bash
| header 1 | header 2 | header 3 |
|:-------- | :------: | --------:|
| left-aligned 文本居左 | centered 文本居中 | right-aligned 文本居右 |
| `:---` 左侧冒号表示**内容和标题栏**居左对齐 | `:--:` 两端都有冒号表示**内容和标题栏**居中对齐 | `---:` 右侧冒号表示**内容和标题栏**居右对齐 |
| 文本居左 | 文本居中 | 文本居右 |
| | | |
```
### B
````bash
| header 1 | header 2 | header 3 |
| --- | ------ |---------:|
| --- | ------ |---------:|
| cell 1 | cell 2 | cell 3 |
| cell 4 | cell 5 is longer | cell 6 is much longer than the others, but that's ok. It will eventually wrap the text when the cell is too large for the display size. |
| cell 7 | | cell <br> 9 |
| cell 4 | cell 5 | cell 6 |
| cell 7 | | cell <br> 9 |
````
### C
````bash
| header 1 | header 2 | header 3 |
| :--- | :------: |---------:|
| :--- | :------: |---------:|
| cell 1 | cell 2 | cell 3 |
| cell 4 | cell 5 is longer | cell 6 is much longer than the others, but that's ok. It will eventually wrap the text when the cell is too large for the display size. |
| cell 7 | | cell <br> 9 |
| cell 4 | cell 5 | cell 6 |
| cell 7 | | cell <br> 9 |
````
{
"node_id": "gml-1c31834f07b04bcc9c5dff5baaa6680c",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "命令"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "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]
$
```
## 答案
```bash
$: 命令提示符. 如果是root用户则提示符是¥;
```
## 选项
### A
```bash
$: 命令提示符. 如果是root用户则提示符是#;
```
### B
```bash
@: 分隔符.
```
### C
```bash
csdn: 表示当前的登陆用户,这里是使用csdn账户登陆.
```
### D
```bash
edu: 主机短名称
```
### E
```bash
~: 当前所在目录
```
### F
```bash
在Linux系统中, 最重要的就是命令, 而每个命令执行必然有两步: 输入和输出.
```
{
"node_id": "gml-fc9a7ad4c2104078a430dac6988be2b3",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "查看", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "9d99e9d47a234651824c90e117668f91"
}
\ No newline at end of file
# 实战:如何查看文件全部内容
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2682),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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'这行
```
{
"node_id": "gml-aa338e6848444ca69346373e15171cff",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "长", "文件", "查看"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "37859717499c41cf89fd2dad4a01e6f3"
}
\ No newline at end of file
# 实战:长内容的文件查看方式
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2683),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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行文本
```
{
"node_id": "gml-b47a6f78d32146c3a7e04ab59f64b8ce",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "vi", "编辑"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "ffae07c755b04b1d80f499060aa88197"
}
\ No newline at end of file
# 实战:使用vi简单的编辑文本
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2684),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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"
```
{
"node_id": "gml-a8e04f2df89a484cb8bd22d3d0e5633d",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "查找", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "f20fa303de92484694b133aebad9113f"
}
\ No newline at end of file
# 实战:查找文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2685),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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
```
{
"node_id": "gml-310c5ffd82204e7580c2a44681b884e6",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "创建", "快捷方式"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "f5bdbdd43d184f26a7783ca3f187070a"
}
\ No newline at end of file
# 实战:创建一个快捷方式
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2686),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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 目录
```
{
"node_id": "gml-acbb691afc4f4b8ba8cf7b0b74f2b21c",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "压缩", "文件"]],
"keywords_forbid": ["解压"]
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "1d52581f0b8a44e3acb757678bb98e10"
}
\ No newline at end of file
# 实战:压缩一个文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2687),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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`压缩包文件
```
{
"node_id": "gml-d1315a1e6baf4131b97f49534410339d",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "解压", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "a92c84137ec24f0fa562c91bee8b7096"
}
\ No newline at end of file
# 实战:解压缩一个文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2688),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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
```
{
"node_id": "gml-41a013b0731e4e348ef458c87db2b66a",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "安装"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "f86f96f6f5594a81822c9c689f46a6a6"
}
\ No newline at end of file
# 实战:在线安装软件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2689),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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 目录的目录树结构
```
{
"node_id": "gml-232c4187598a4e1b851d871070514e10",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "效率", "技巧"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "d56da15acdc74b648fd90b0b39edd28a"
}
\ No newline at end of file
# 实战:提升效率的一些技巧
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2690),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
history命令就是查看当前用户下所以有历史执行命令。
因此在Linux下输入命令的时候,在命令行参数里直接指定密码是安全的行为。
```
## 选项
### A
```bash
上下翻页键可以直接回显最近执行的一条命令。
```
### B
```bash
history命令就是查看当前用户下所以有历史执行命令。
因此在Linux下输入命令的时候,在命令行参数里直接指定密码是不安全的行为。
```
### C
```bash
[tab]热键是Linux bash shell中最最常用的键了。
它具有补全命令和文件补全的功能。
```
{
"node_id": "gml-c430b5c28d9b42a88d3660cc7ad9c265",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "基础命令"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "5a9951c0498b4b418b1944ae3925bb14"
}
\ No newline at end of file
# 实战:Linux基础命令汇总
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2691),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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
```
{
"node_id": "gml-f9bb56211d994831a3560d3e07be0b1d",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "创建", "目录"]],
"keywords_forbid": ["删除"]
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "ec52393cb69b47f8a02ace9564551c8d"
}
\ No newline at end of file
# 实战:创建一个目录
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2674),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
创建doc目录的命令是:`makedir doc`
```
## 选项
### A
```bash
在Linux下权限是极其严格的,如果不在home目录下,
是没有权限创建目录的.
```
### B
```bash
创建doc目录的命令是:`mkdir doc`
```
### C
```bash
切换当前目录到var目录的命令是: `cd /var`
```
{
"node_id": "gml-5d30b74764e645f49839c545d784f29e",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "入门"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "a567f4bf1b1a491c8f556106ca15cf0a"
}
\ No newline at end of file
# 实战:Linux入门总结
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2692),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
Linux Shell环境只能使用命令,不能编程
```
## 选项
### A
```bash
使用Linux命令还可以对系统和系统日志进行维护
```
### B
```bash
使用Linux命令还可以对磁盘管理
```
### C
```bash
Linux命令还可以对用户文件系统进行权限管理
```
{
"node_id": "gml-62c754366e084ce19576ff0924133dc6",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "创建", "文件"]],
"keywords_forbid": ["删除"]
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "e1f216b894d244a2a9f461933a8cf5ed"
}
\ No newline at end of file
# 实战:创建一个空白文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2675),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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`文件
```
{
"node_id": "gml-2a3760d1fd58418e8f9cb1f3119480eb",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "路径"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "e704fc7244814225b5b3db2aae0d9fd7"
}
\ No newline at end of file
# 实战:认识路径的概念
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2676),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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 目录
```
{
"node_id": "gml-1ed5c9ff30664b24929ad91679b63bb8",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "删除", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "97f1925d8bcb4bc6a3fab4a9189a47f6"
}
\ No newline at end of file
# 实战:删除一个文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2677),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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`存在
```
{
"node_id": "gml-c7b64290b99348ee9c2887bde6a03f19",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "删除", "目录"]],
"keywords_forbid": ["创建"]
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "efb3d5704b8f4aaf808715c446f65d6d"
}
\ No newline at end of file
# 实战:删除目录
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2678),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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` 都可以用来删除目录
```
{
"node_id": "gml-25e7ed10efe34ad0a70ff2ee09b011da",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "复制", "目录"], ["Linux", "复制", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "a302203baa2c4850830d2727d24af8c9"
}
\ No newline at end of file
# 实战:复制目录和文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2679),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```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
```
{
"node_id": "gml-8ab0b3e1106f47cda68f668fbe190392",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "移动", "目录"], ["Linux", "移动", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"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": "ea4322f2fe8644c39c90571979d0b9cd"
}
\ No newline at end of file
# 实战:移动目录和文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2680),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:cd /home/csdn
执行命令:mkdir test
执行命令:mv test test3
此时,文件夹 /home/csdn/test/ 存在
```
## 选项
### A
```bash
执行命令:cd /home/csdn
执行命令:touch 1.txt
执行命令:mkdir test
执行命令:mv 1.txt test/
此时,存在文件 /home/csdn/test/1.txt
```
### B
```bash
执行命令:cd /home/csdn
执行命令:touch 1.txt
执行命令:mkdir test
执行命令:mv 1.txt test/
此时,文件 /home/csdn/1.txt 已不存在
```
### C
```bash
执行命令:cd /home/csdn
执行命令:mkdir test
执行命令:mv test test3
此时,文件夹 /home/csdn/test3/ 存在
```
{
"node_id": "gml-3cd2a915d7f5493ebb10729d527579fa",
"keywords": [],
"children": [],
"export": [
"exercise_01.json"
],
"keywords_must": [["Linux", "重命名", "目录"], ["Linux", "重命名", "文件"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36675?targetLesson=2681",
"task_id_info": {
"course_id": 36675,
"task_id": 2681
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "ce04d6204dfb4a1ea501d944a65a8fa6"
}
\ No newline at end of file
# 实战:重命名目录和文件
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36675?targetLesson=2681),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
提示:`rename` 命令支持通配符方式批量重命名,下面的选项需要你在实战环境中自己做额外测试。
## 答案
```bash
执行命令:`touch a_01.txt`
执行命令:`touch a_02.txt`
执行命令:`rename a b`
此时目录下存在两个文件`b_01.txt``b_02.txt`
```
## 选项
### A
```bash
使用 `mv a b` 重命名文件a为b
实际上就是在当前目录下移动文件a到b
```
### B
```bash
使用 `mv A B` 重命名文件夹A为B
实际上就是在当前目录下移动文件夹A到B
```
### C
```bash
执行命令:`touch a_01.txt`
执行命令:`touch a_02.txt`
执行命令:`rename a b *`
此时目录下存在两个文件`b_01.txt``b_02.txt`
```
{
"node_id": "gml-59cbc635a28b4a758b2070206eab6664",
"keywords": [],
"keywords_must": [["Linux", "命令"]],
"keywords_forbid": []
}
\ No newline at end of file
{
"node_id": "gml-107df6e5ed9b4bef8b035e0649b2449e",
"keywords": [],
"keywords_must": [["Linux", "新增", "用户"], ["Linux", "添加", "用户"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2693",
"task_id_info": {
"course_id": 36676,
"task_id": 2693
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "de8b9e5f228e4099bfc1373e3933a8eb"
}
\ No newline at end of file
# 实战:新增用户
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2693),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`useradd blue`
此时创建了一个用户,用户名为 blue
并且在 /home 目录下创建了一个用户目录 /home/blue
```
## 选项
### A
```bash
执行命令:`sudo useradd blue -d /home/red`
此时创建了一个用户,用户名为 blue
并且在 /home 目录下创建了一个用户目录 /home/red
```
### B
```bash
执行命令:`sudo useradd red -d /home/red`
此时创建了一个用户,用户名为 red
并且在 /home 目录下创建了一个用户目录 /home/red
```
### C
```bash
执行命令:`sudo useradd blue`
此时创建了一个用户,用户名为 blue
并且在 /home 目录下创建了一个用户目录 /home/blue
```
{
"node_id": "gml-326862a132ac4b548b70e5766a71c1ae",
"keywords": [],
"keywords_must": [["Linux", "修改", "文件", "权限"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2702",
"task_id_info": {
"course_id": 36676,
"task_id": 2702
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "ad3b1f01a0ea47f58c87fa2bacc9b07f"
}
\ No newline at end of file
# 实战:修改文件权限
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2702),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
Code文件的权限为:`drwxrwxr--`
则权限数字为:772
```
## 选项
### A
```bash
Code文件的权限为:`drwxrwx---`
则权限数字为:770
```
### B
```bash
执行命令:`chmod 777 Code`
则Code文件的权限为:`drwxrwxrwx`
```
### C
```bash
执行命令:`chmod 757 Code`
则Code文件的权限为:`drwxr-xrwx`
```
{
"node_id": "gml-e4d153da66c945df9c07dc52e5a05598",
"keywords": [],
"keywords_must": [["Linux", "修改", "文件", "所有者"], ["Linux", "更改", "文件", "所有者"], ["Linux", "改变", "文件", "所有者"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2703",
"task_id_info": {
"course_id": 36676,
"task_id": 2703
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "59cb6ac025a0489da84a440c467a5989"
}
\ No newline at end of file
# 实战:修改文件所有者
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2703),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:sudo chmod csdn /tmp/yum.log
执行命令:ll /tmp/yum.log
输出:-rw------- 1 csdn root 0 5月 4 2020 /tmp/yum.log
表示文件 yum.log 已授权给用户 csdn
```
## 选项
### A
```bash
通过命令chown,可以将一个文件授权给多个用户
```
### B
```bash
chown 是 change owner 的缩写
```
### C
```bash
执行命令:sudo chown csdn /tmp/yum.log
执行命令:ll /tmp/yum.log
输出:-rw------- 1 csdn root 0 5月 4 2020 /tmp/yum.log
表示文件 yum.log 已授权给用户 csdn
```
{
"node_id": "gml-30df84c89e2e4846aee3b9f07a48fb9a",
"keywords": [],
"keywords_must": [["Linux", "修改", "文件", "组"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2704",
"task_id_info": {
"course_id": 36676,
"task_id": 2704
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "2cff275b570646c8b3ef2531575f6bd0"
}
\ No newline at end of file
# 实战:修改文件所在组
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2704),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:sudo chown csdn /tmp/yum.log
执行命令:sudo chgroup csdn /tmp/yum.log
执行命令:ll /tmp/yum.log
输出:-rw------- 1 csdn csdn 0 5月 4 2020 /tmp/yum.log
表示文件 yum.log 已授权给用户 csdn 授权给用户组 csdn
```
## 选项
### A
```bash
chown chgrp 可以组合使用
```
### B
```bash
chgrp 是 change group 的缩写
```
### C
```bash
执行命令:sudo chown csdn /tmp/yum.log
执行命令:sudo chgrp csdn /tmp/yum.log
执行命令:ll /tmp/yum.log
输出:-rw------- 1 csdn csdn 0 5月 4 2020 /tmp/yum.log
表示文件 yum.log 已授权给用户 csdn 授权给用户组 csdn
```
{
"node_id": "gml-6530732255a141b69a712f52cd695bb5",
"keywords": [],
"keywords_must": [["Linux", "命令"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2705",
"task_id_info": {
"course_id": 36676,
"task_id": 2705
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "89a5d4194864477a9c8bc6057817e09f"
}
\ No newline at end of file
# 实战:Linux实战,谁是第一美女
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2705),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
一个用户只能属于一个组
```
## 选项
### A
```bash
一个文件可以分别针对当前用户,用户组,其他用户设置权限
```
### B
```bash
一个组可以包含多个用户
```
### C
```bash
一个用户可以属于多个组
```
{
"node_id": "gml-be2d934d6b074cdfb013188d8bbcee3a",
"keywords": [],
"keywords_must": [["Linux", "查看", "进程"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2706",
"task_id_info": {
"course_id": 36676,
"task_id": 2706
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "7d7e47c2947643faa593c846fd5cade5"
}
\ No newline at end of file
# 实战:查看系统进程
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2706),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
`ps aux` 看不到进程的内存和CPU占用信息
```
## 选项
### A
```bash
`ps aux` 可以查看进程PID信息
进程编号(PID)1 被分配给启动过程中执行的第一个进程,PID 1 之后的每一个进程都是它的子孙。 PID 1 进程是初始化进程,在大多数新版本的 Linux 中,它只是一个指向 systemd 程序的符号链接。
```
### B
```bash
`ps aux`中 aux参数的含义
a 显示现行终端机下的所有程序,包括其他用户的程序
u 以用户为主的格式来显示程序状况。
x 显示所有程序,不以终端机来区分。
```
### C
```bash
可以通过`ps aux`查看系统进程信息。
```
{
"node_id": "gml-664426ba00d54e809da78070856cedd9",
"keywords": [],
"keywords_must": [["Linux", "监控", "进程"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2707",
"task_id_info": {
"course_id": 36676,
"task_id": 2707
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "2add595b40634b05bc183146fdd83d03"
}
\ No newline at end of file
# 实战:实时监控进程运行
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2707),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
通过`top`命令可以查看端口占用
```
## 选项
### A
```bash
通过`top`或者`htop`可以查看进程和内存占用
```
### B
```bash
通过命令:`sudo yum install htop`
可以安装一个更强大的进程监控命令`htop`
```
### C
```bash
`top` 命令可以实时监控系统的进程信息
```
{
"node_id": "gml-222d86f8aece49718f0e8f2bcbb6047c",
"keywords": [],
"keywords_must": [["Linux", "定时任务"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2708",
"task_id_info": {
"course_id": 36676,
"task_id": 2708
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "ccb2a640b244462d8af670edaa2b4275"
}
\ No newline at end of file
# 实战:定时任务
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2708),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
定时任务表达式:*/1 * * * *
表示每隔1小时执行任务
```
## 选项
### A
```bash
crontab status 可以查看定时任务状态
```
### B
```bash
crontab -l 可以查看定时任务列表
```
### C
```bash
sudo crontab -e 可以创建定时任务文件
```
{
"node_id": "gml-b8b1192175914cd0913e106705c07c13",
"keywords": [],
"keywords_must": [["Linux", "设置", "密码"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2694",
"task_id_info": {
"course_id": 36676,
"task_id": 2694
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "67fffe71c1214de783770b1bafb15177"
}
\ No newline at end of file
# 实战:给账户设置密码
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2694),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`sudo passwd edu`
可以为edu用户配置密码
从安全角度来说应该输入8位以下纯数字密码。
```
## 选项
### A
```bash
执行命令:`sudo passwd`
可以为当前用户配置密码
从安全角度来说应该输入8位以上包含字母数字下划线的密码。
```
### B
```bash
执行命令:`sudo passwd root`
可以为root用户配置密码
从安全角度来说应该输入8位以上包含字母数字下划线的密码。
```
### C
```bash
执行命令:`sudo passwd edu`
可以为edu用户配置密码
从安全角度来说应该输入8位以上包含字母数字下划线的密码。
```
{
"node_id": "gml-8b4ccd76282143a69e656f2142435c0f",
"keywords": [],
"keywords_must": [["Linux", "切换", "用户"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2695",
"task_id_info": {
"course_id": 36676,
"task_id": 2695
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "d5080130f5d44d3f81d2a24dc09719e1"
}
\ No newline at end of file
# 实战:切换用户
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2695),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
输入命令:`whoisyourdaddy`
可以查看当前用户是从哪个用户切换过来的。
```
## 选项
### A
```bash
执行命令:`su - edu`
输入密码登陆到edu用户
再次执行命令:`su - edu`
输入密码登陆到edu用户
执行命令:`exit`
执行命令:`exit`
此时,回到了最开始的登陆用户
```
### B
```bash
输入命令:`whoami`
可以查看当前用户名
```
### C
```bash
执行命令:`su - edu`
输入edu账户的密码
此时进入了 edu 账户
```
{
"node_id": "gml-f4db21b22cc64300a378f195d2358379",
"keywords": [],
"keywords_must": [["Linux", "删除", "用户"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2696",
"task_id_info": {
"course_id": 36676,
"task_id": 2696
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "5a8677d34ece46b6bcd3eff682e20767"
}
\ No newline at end of file
# 实战:删除用户
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2696),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
用户可以随意删除,例如应该经常删除root用户,保证系统干净
```
## 选项
### A
```bash
不建议手工用vi删除用户
```
### B
```bash
使用vi编辑这些文件可以删除用户 edu
* 用户基本信息:存储在 /etc/passwd 文件中
* 用户密码信息:存储在 /etc/shadow 文件中
* 用户群组基本信息:存储在 /etc/group 文件中
* 用户群组信息信息:存储在 /etc/gshadow 文件中
* 主目录默认位于 /home/edu
```
### C
```bash
执行命令:`sudo userdel -r edu`
可以删除用户 edu
```
{
"node_id": "gml-5830d451d5f140a9bbb6aba2ef760459",
"keywords": [],
"keywords_must": [["Linux", "uid"], ["Linux", "gid"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2697",
"task_id_info": {
"course_id": 36676,
"task_id": 2697
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "625cadddd56e495eb4172f9fd61fd0f1"
}
\ No newline at end of file
# 实战:显示用户UID和GID
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2697),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
一个用户只能属于一个组
```
## 选项
### A
```bash
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn)
uid表示用户id
gid表示用户的初始组id
groups表示用户所在的组
```
### B
```bash
执行命令:`id csdn`
可以查看csdn用户的id信息
```
### C
```bash
执行命令:`id`
可以查看当前用户的id信息
```
{
"node_id": "gml-88ec027b007f4c9fb7df2b622c4f7b5a",
"keywords": [],
"keywords_must": [["Linux", "新增", "用户组"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2698",
"task_id_info": {
"course_id": 36676,
"task_id": 2698
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "20796270399c4ef8aee51a4fa8ad0d35"
}
\ No newline at end of file
# 实战:新增用户组
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2698),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`groupadd test`
执行命令:`tail -n 1 /etc/group`
可以查看刚创建的组 test 的信息
```
## 选项
### A
```bash
执行命令:`cat /etc/group`
可以查看所有用户组的id信息
```
### B
```bash
执行命令:`sudo groupadd test`
使用vi编辑器打开/etc/group,删除最后一行test用户信息
再次执行:`sudo groupadd test`
执行命令:`tail -n 1 /etc/group`
可以查看到组 test 的信息
```
### C
```bash
执行命令:`sudo groupadd test`
执行命令:`tail -n 1 /etc/group`
可以查看刚创建的组 test 的信息
```
{
"node_id": "gml-b1826b136ef44c87b503777ce185b355",
"keywords": [],
"keywords_must": [["Linux", "删除", "用户组"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2699",
"task_id_info": {
"course_id": 36676,
"task_id": 2699
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "534bbbe6439049cf9363127274eab27f"
}
\ No newline at end of file
# 实战:删除用户组
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2699),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
执行命令:`sudo groupadd test`
执行命令:`groupdel test`
此时,用户组 test 已经被删除
```
## 选项
### A
```bash
执行命令:`sudo groupdel root`
这个命令会失败,不能删除主用户组
```
### B
```bash
执行命令:`sudo groupadd test`
执行命令:`tail -n 1 /etc/group`
记住此时 test 用户组的信息
执行命令:`sudo groupdel test`
执行命令:`sudo groupadd test`
执行命令:`tail -n 1 /etc/group`
记住此时 test 用户组的信息
两次查看 test 用户组的信息一致
```
### C
```bash
执行命令:`sudo groupadd test`
执行命令:`sudo groupdel test`
此时,用户组 test 已经被删除
```
{
"node_id": "gml-f6582cee0184478c9610f15aac86d62f",
"keywords": [],
"keywords_must": [["Linux", "加入", "用户组"], ["Linux", "移除", "用户组"], ["Linux", "添加", "用户组"], ["Linux", "删除", "用户组"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2700",
"task_id_info": {
"course_id": 36676,
"task_id": 2700
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "c6730df6df4c455eb29af29af1505e0c"
}
\ No newline at end of file
# 实战:把用户加入和移除用户组
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2700),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
## 答案
```bash
假设用户 csdn 的id信息如下:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn)
假设存在用户组 test
执行命令:`sudo gpasswd -a csdn test`
执行命令:`sudo groupdel test`
执行命令:`sudo groupadd test`
执行命令:`id csdn`
输出:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn),1002(test)
```
## 选项
### A
```bash
假设用户 csdn 的id信息如下:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn)
假设存在用户组 test
执行命令:`sudo gpasswd -a csdn test`
执行命令:`sudo groupdel test`
执行命令:`sudo groupadd test`
执行命令:`id csdn`
输出:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn)
```
### B
```bash
假设用户 csdn 的id信息如下:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn)
假设存在用户组 test
执行命令:`sudo gpasswd -a csdn test`
执行命令:`sudo groupdel test`
执行命令:`id csdn`
输出:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn)
```
### C
```bash
假设用户 csdn 的id信息如下:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn)
假设存在用户组 test
执行命令:`sudo gpasswd -a csdn test`
执行命令:`id csdn`
输出:
uid=1000(csdn) gid=1000(csdn) groups=1000(csdn),1002(test)
```
{
"node_id": "gml-a4f88e4e308541e4a7db5927297bb923",
"keywords": [],
"keywords_must": [["Linux", "文件", "权限"]],
"keywords_forbid": [],
"children": [],
"export": [
"exercise_01.json"
]
}
\ No newline at end of file
{
"type": "task_git_course",
"task_link": "https://edu.csdn.net/lab/36676?targetLesson=2701",
"task_id_info": {
"course_id": 36676,
"task_id": 2701
},
"author": "csdn.net",
"source": "exercise_01.md",
"notebook_enable": false,
"depends": [],
"exercise_id": "bbec02ab33144499b8aee7c19675bb33"
}
\ No newline at end of file
# 实战:文件权限的基本介绍
* 请在线上Linux环境里完成[Linux实战任务](https://edu.csdn.net/lab/36676?targetLesson=2701),完成实战练习后请点击【`检测任务`】按钮。
* 通过实战练习,你已经掌握了相关知识,以下描述错误的是?
执行命令:`ls -l`
输出:
```bash
drwxr-xr-x 2 csdn csdn 4096 8月 3 17:49 Code
```
## 答案
```bash
其他用户对该文件有写权限
```
## 选项
### A
```bash
csdn 表示所有者
```
### B
```bash
2 表示链接数
```
### C
```bash
drwxr-xr-x 表示文件类型和权限
按顺序其中:
* d: 表示文件类型
* 第一个rwx: 表示拥有者权限
* 接着的r-x: 表示所属用户组权限
* 接着的r-x: 表示其他用户权限
```
### D
```bash
4096 表示文件大小
```
{
"node_id": "gml-06610d1e8d33425a942df5f6d010001d",
"keywords": [],
"keywords_must": [["Linux", "命令"]],
"keywords_forbid": []
}
\ No newline at end of file
......@@ -135,6 +135,40 @@
],
"keywords_forbid": []
}
},
{
"极简Git+VSCode(Mac)": {
"node_id": "gml-23b8a7b7033540e388c911bb0298aa7b",
"keywords": [
"VSCode配置Git"
],
"children": [],
"keywords_must": [
[
"VSCode",
"Git",
"Mac"
]
],
"keywords_forbid": []
}
},
{
"极简Git+VSCode(Windows)": {
"node_id": "gml-0e1928df298a40fbbfc81e73809035ad",
"keywords": [
"VSCode配置Git"
],
"children": [],
"keywords_must": [
[
"VSCode",
"Git",
"Windows"
]
],
"keywords_forbid": []
}
}
],
"keywords_must": [],
......@@ -329,6 +363,340 @@
"keywords_must": [],
"keywords_forbid": []
}
},
{
"Linux入门": {
"node_id": "gml-59cbc635a28b4a758b2070206eab6664",
"keywords": [],
"children": [
{
"初识Linux": {
"node_id": "gml-1c31834f07b04bcc9c5dff5baaa6680c",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"命令"
]
],
"keywords_forbid": []
}
},
{
"创建一个目录": {
"node_id": "gml-f9bb56211d994831a3560d3e07be0b1d",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"创建",
"目录"
]
],
"keywords_forbid": [
"删除"
]
}
},
{
"创建一个空白文件": {
"node_id": "gml-62c754366e084ce19576ff0924133dc6",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"创建",
"文件"
]
],
"keywords_forbid": [
"删除"
]
}
},
{
"认识路径的概念": {
"node_id": "gml-2a3760d1fd58418e8f9cb1f3119480eb",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"路径"
]
],
"keywords_forbid": []
}
},
{
"删除一个文件": {
"node_id": "gml-1ed5c9ff30664b24929ad91679b63bb8",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"删除",
"文件"
]
],
"keywords_forbid": []
}
},
{
"删除目录": {
"node_id": "gml-c7b64290b99348ee9c2887bde6a03f19",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"删除",
"目录"
]
],
"keywords_forbid": [
"创建"
]
}
},
{
"复制目录和文件": {
"node_id": "gml-25e7ed10efe34ad0a70ff2ee09b011da",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"复制",
"目录"
],
[
"Linux",
"复制",
"文件"
]
],
"keywords_forbid": []
}
},
{
"移动目录和文件": {
"node_id": "gml-8ab0b3e1106f47cda68f668fbe190392",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"移动",
"目录"
],
[
"Linux",
"移动",
"文件"
]
],
"keywords_forbid": []
}
},
{
"重命名目录和文件": {
"node_id": "gml-3cd2a915d7f5493ebb10729d527579fa",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"重命名",
"目录"
],
[
"Linux",
"重命名",
"文件"
]
],
"keywords_forbid": []
}
},
{
"如何查看文件全部内容": {
"node_id": "gml-fc9a7ad4c2104078a430dac6988be2b3",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"查看",
"文件"
]
],
"keywords_forbid": []
}
},
{
"长内容的文件查看方式": {
"node_id": "gml-aa338e6848444ca69346373e15171cff",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"长",
"文件",
"查看"
]
],
"keywords_forbid": []
}
},
{
"使用vi简单的编辑文本": {
"node_id": "gml-b47a6f78d32146c3a7e04ab59f64b8ce",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"vi",
"编辑"
]
],
"keywords_forbid": []
}
},
{
"查找文件": {
"node_id": "gml-a8e04f2df89a484cb8bd22d3d0e5633d",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"查找",
"文件"
]
],
"keywords_forbid": []
}
},
{
"创建一个快捷方式": {
"node_id": "gml-310c5ffd82204e7580c2a44681b884e6",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"创建",
"快捷方式"
]
],
"keywords_forbid": []
}
},
{
"压缩一个文件": {
"node_id": "gml-acbb691afc4f4b8ba8cf7b0b74f2b21c",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"压缩",
"文件"
]
],
"keywords_forbid": [
"解压"
]
}
},
{
"解压缩一个文件": {
"node_id": "gml-d1315a1e6baf4131b97f49534410339d",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"解压",
"文件"
]
],
"keywords_forbid": []
}
},
{
"在线安装软件": {
"node_id": "gml-41a013b0731e4e348ef458c87db2b66a",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"安装"
]
],
"keywords_forbid": []
}
},
{
"提升效率的一些技巧": {
"node_id": "gml-232c4187598a4e1b851d871070514e10",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"效率",
"技巧"
]
],
"keywords_forbid": []
}
},
{
"Linux基础命令汇总": {
"node_id": "gml-c430b5c28d9b42a88d3660cc7ad9c265",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"基础命令"
]
],
"keywords_forbid": []
}
},
{
"Linux入门总结": {
"node_id": "gml-5d30b74764e645f49839c545d784f29e",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"入门"
]
],
"keywords_forbid": []
}
}
],
"keywords_must": [
[
"Linux",
"命令"
]
],
"keywords_forbid": []
}
}
],
"keywords_must": [],
......@@ -339,7 +707,299 @@
"gml中阶": {
"node_id": "gml-a94f8931a29e42749c65af33b5f00ffa",
"keywords": [],
"children": [],
"children": [
{
"Linux进阶": {
"node_id": "gml-06610d1e8d33425a942df5f6d010001d",
"keywords": [],
"children": [
{
"新增用户": {
"node_id": "gml-107df6e5ed9b4bef8b035e0649b2449e",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"新增",
"用户"
],
[
"Linux",
"添加",
"用户"
]
],
"keywords_forbid": []
}
},
{
"给账户设置密码": {
"node_id": "gml-b8b1192175914cd0913e106705c07c13",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"设置",
"密码"
]
],
"keywords_forbid": []
}
},
{
"切换用户": {
"node_id": "gml-8b4ccd76282143a69e656f2142435c0f",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"切换",
"用户"
]
],
"keywords_forbid": []
}
},
{
"删除用户": {
"node_id": "gml-f4db21b22cc64300a378f195d2358379",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"删除",
"用户"
]
],
"keywords_forbid": []
}
},
{
"显示用户UID和GID": {
"node_id": "gml-5830d451d5f140a9bbb6aba2ef760459",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"uid"
],
[
"Linux",
"gid"
]
],
"keywords_forbid": []
}
},
{
"新增用户组": {
"node_id": "gml-88ec027b007f4c9fb7df2b622c4f7b5a",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"新增",
"用户组"
]
],
"keywords_forbid": []
}
},
{
"删除用户组": {
"node_id": "gml-b1826b136ef44c87b503777ce185b355",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"删除",
"用户组"
]
],
"keywords_forbid": []
}
},
{
"把用户加入和移除用户组": {
"node_id": "gml-f6582cee0184478c9610f15aac86d62f",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"加入",
"用户组"
],
[
"Linux",
"移除",
"用户组"
],
[
"Linux",
"添加",
"用户组"
],
[
"Linux",
"删除",
"用户组"
]
],
"keywords_forbid": []
}
},
{
"文件权限的基本介绍": {
"node_id": "gml-a4f88e4e308541e4a7db5927297bb923",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"文件",
"权限"
]
],
"keywords_forbid": []
}
},
{
"修改文件权限": {
"node_id": "gml-326862a132ac4b548b70e5766a71c1ae",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"修改",
"文件",
"权限"
]
],
"keywords_forbid": []
}
},
{
"修改文件所有者": {
"node_id": "gml-e4d153da66c945df9c07dc52e5a05598",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"修改",
"文件",
"所有者"
],
[
"Linux",
"更改",
"文件",
"所有者"
],
[
"Linux",
"改变",
"文件",
"所有者"
]
],
"keywords_forbid": []
}
},
{
"修改文件所在组": {
"node_id": "gml-30df84c89e2e4846aee3b9f07a48fb9a",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"修改",
"文件",
"组"
]
],
"keywords_forbid": []
}
},
{
"Linux实战,谁是第一美女": {
"node_id": "gml-6530732255a141b69a712f52cd695bb5",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"命令"
]
],
"keywords_forbid": []
}
},
{
"查看系统进程": {
"node_id": "gml-be2d934d6b074cdfb013188d8bbcee3a",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"查看",
"进程"
]
],
"keywords_forbid": []
}
},
{
"实时监控进程运行": {
"node_id": "gml-664426ba00d54e809da78070856cedd9",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"监控",
"进程"
]
],
"keywords_forbid": []
}
},
{
"定时任务": {
"node_id": "gml-222d86f8aece49718f0e8f2bcbb6047c",
"keywords": [],
"children": [],
"keywords_must": [
[
"Linux",
"定时任务"
]
],
"keywords_forbid": []
}
}
],
"keywords_must": [
[
"Linux",
"命令"
]
],
"keywords_forbid": []
}
}
],
"keywords_must": [],
"keywords_forbid": []
}
......
from skill_tree.tree import TreeWalker
if __name__ == '__main__':
walker = TreeWalker("data", "gml", "CS入门")
walker = TreeWalker("data", "gml", "CS入门", ignore_keywords=True)
walker.walk()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册