From 5a38edb8b886a36ab4516c55aa028187ba97f294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=99=E8=8B=8F=E6=96=87?= <12071386+que-su-wen@user.noreply.gitee.com> Date: Sat, 18 May 2024 14:48:36 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=2021=20?= =?UTF-8?q?=E9=98=99=E8=8B=8F=E6=96=87=20=E4=B8=BA=2022=20=E9=98=99?= =?UTF-8?q?=E8=8B=8F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...47\254\254\344\270\200\350\257\276\347\254\224\350\256\260.md" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "21 \351\230\231\350\213\217\346\226\207/Linux\347\254\254\344\270\200\350\257\276\347\254\224\350\256\260.md" => "22 \351\230\231\350\213\217\346\226\207/Linux\347\254\254\344\270\200\350\257\276\347\254\224\350\256\260.md" (100%) diff --git "a/21 \351\230\231\350\213\217\346\226\207/Linux\347\254\254\344\270\200\350\257\276\347\254\224\350\256\260.md" "b/22 \351\230\231\350\213\217\346\226\207/Linux\347\254\254\344\270\200\350\257\276\347\254\224\350\256\260.md" similarity index 100% rename from "21 \351\230\231\350\213\217\346\226\207/Linux\347\254\254\344\270\200\350\257\276\347\254\224\350\256\260.md" rename to "22 \351\230\231\350\213\217\346\226\207/Linux\347\254\254\344\270\200\350\257\276\347\254\224\350\256\260.md" -- Gitee From f29813883e3398f2b3c79e81e503f881a614012d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=99=E8=8B=8F=E6=96=87?= <12071386+que-su-wen@user.noreply.gitee.com> Date: Sun, 19 May 2024 10:49:58 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 阙苏文 <12071386+que-su-wen@user.noreply.gitee.com> --- ...24\350\256\260\344\275\234\344\270\232.md" | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 "22 \351\230\231\350\213\217\346\226\207/20240518linux\350\247\243\345\216\213\347\274\251\346\226\207\344\273\266\347\254\224\350\256\260\344\275\234\344\270\232.md" diff --git "a/22 \351\230\231\350\213\217\346\226\207/20240518linux\350\247\243\345\216\213\347\274\251\346\226\207\344\273\266\347\254\224\350\256\260\344\275\234\344\270\232.md" "b/22 \351\230\231\350\213\217\346\226\207/20240518linux\350\247\243\345\216\213\347\274\251\346\226\207\344\273\266\347\254\224\350\256\260\344\275\234\344\270\232.md" new file mode 100644 index 0000000..226101d --- /dev/null +++ "b/22 \351\230\231\350\213\217\346\226\207/20240518linux\350\247\243\345\216\213\347\274\251\346\226\207\344\273\266\347\254\224\350\256\260\344\275\234\344\270\232.md" @@ -0,0 +1,54 @@ +# 笔记 + +常用命令: + +```js +回到/home根文件:cd ~ +查看当前目录:pwd +ls 查看文件 +删除文件: rm 文件名 +创建文件夹:mkdir 文件夹名称 +创建文件:touch 文件名称 +echo命令语法:echo 字符串 +提取值:echo $变量 +``` + +# 作业 + +1.首先创建用户 :address 用户名 + +2.创建文件夹: mkdir 文件夹名称 -p + +3.创建txt文件: touch 文件名称.txt + +4.添加txt文件的内容:vim 文件名称.txt + +5.文件解压缩 + +```js +//tar压缩 +tar -cvf archive.tar file1 file2 folder1 +//打开终端,并使用以下命令将文件/文件夹压缩为.tar文件,将 "archive.tar" 替换为您要创建的.tar文件的文件名。将 "file1"、"file2" 替换为要压缩的具体文件名,将 "folder1" 替换为要压缩的文件夹名。 + +//如果要压缩整个文件夹及其内容 +tar -cvf archive.tar folder +//将 "archive.tar" 替换为您要创建的.tar文件的文件名,将 "folder" 替换为要压缩的文件夹名。 + +//zip压缩 +zip -r myfolder.zip myfolder +//-r:递归地打包文件夹中的所有文件和子文件夹。 +//myfolder.zip:生成的 ZIP 文件的名称。 +//myfolder:要打包的文件夹。 +unzip -l myfolder.zip //查看 ZIP 文件的内容 +``` + +什么是环境变量: + +```js +环境变量是指在操作系统中被设定的一些特定的变量,它们记录了一些与操作系统运行相关的信息。这些变量通常被用来配置操作系统或应用程序的行为。 + +在计算机领域中,环境变量可以包括一些系统级别的信息,例如操作系统的路径、语言、字体等信息,也可以包括用户级别的信息,例如用户的主目录、配置文件的路径等信息。 + +环境变量可以通过操作系统提供的工具进行设置、修改和查询。在命令行界面中,可以使用"set"命令来列出当前存在的所有环境变量。在编程中,可以通过调用操作系统提供的API函数来访问环境变量。 +``` + -- Gitee