From 8c2cb8d653ffdabb21a27da5b9795c2f0addc574 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 Jun 2024 16:37:56 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20240607\346\235\203\351\231\220.md" | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 "\345\215\242\347\216\211\345\215\216/20240607\346\235\203\351\231\220.md" diff --git "a/\345\215\242\347\216\211\345\215\216/20240607\346\235\203\351\231\220.md" "b/\345\215\242\347\216\211\345\215\216/20240607\346\235\203\351\231\220.md" new file mode 100644 index 0000000..c431300 --- /dev/null +++ "b/\345\215\242\347\216\211\345\215\216/20240607\346\235\203\351\231\220.md" @@ -0,0 +1,27 @@ +## 隐藏权限 + +修改 :使用 `chattr` 命令设置文件的隐藏权限 + +chattr命令选项 + ++i : 将文件设置为不可修改。一但设置,文件将无法被修改,删除,重命名或链接 + +-i :取消文件的不可修改属性 + ++a : 将文件设置为只追加,一但设置,文件只能追加数据,无法修改或删除已有内容 + +-a : 取消文件的只追加属性 + +查看 :使用 `lsattr` 命令查看隐藏权限 + +## 文件默认权限 + +`umask`,用来控制创建文件和目录的权限。 + +umask值由三个数字组成,分别表示文件的所有者,文件所属组和其他用户的权限,每个数字都可以是0-7之间的值,对应不同的权限设置。 + +第一个数字表示文件所有者的权限 + +第二个数字表示文件所属组的权限 + +第三个数字表示其他用户的权限 \ No newline at end of file -- Gitee From e4e3a41a376ea820f4adde3d2dfc9e6ad7cccb1d Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 Jun 2024 16:55:03 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20240606.wsd" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "\345\215\242\347\216\211\345\215\216/20240606.md" => "\345\215\242\347\216\211\345\215\216/20240606.wsd" (100%) diff --git "a/\345\215\242\347\216\211\345\215\216/20240606.md" "b/\345\215\242\347\216\211\345\215\216/20240606.wsd" similarity index 100% rename from "\345\215\242\347\216\211\345\215\216/20240606.md" rename to "\345\215\242\347\216\211\345\215\216/20240606.wsd" -- Gitee From e713106203d35c3850ca000343f63b121cbd5ee3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 12 Jun 2024 11:08:55 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...73\345\212\241\347\256\241\347\220\206.md" | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 "\345\215\242\347\216\211\345\215\216/20240612\345\221\250\346\234\237\344\273\273\345\212\241\347\256\241\347\220\206.md" diff --git "a/\345\215\242\347\216\211\345\215\216/20240612\345\221\250\346\234\237\344\273\273\345\212\241\347\256\241\347\220\206.md" "b/\345\215\242\347\216\211\345\215\216/20240612\345\221\250\346\234\237\344\273\273\345\212\241\347\256\241\347\220\206.md" new file mode 100644 index 0000000..0e68c32 --- /dev/null +++ "b/\345\215\242\347\216\211\345\215\216/20240612\345\221\250\346\234\237\344\273\273\345\212\241\347\256\241\347\220\206.md" @@ -0,0 +1,28 @@ +## Linux周期任务管理 + +概念: + +提供了一种可以重复的,指定重复周期的一种机制 + +路径: + +系统级:/etc/cron.hourly/weekly/monthly/yearly + +用户级:/var/spool/cron/crontabs/root (root用户的周期任务) + +配置周期任务: + +系统级:编辑对应的系统配置文件(对应小时,天,周) + +用户级:编辑对应的系统配置文件 + +命令: + +crontab -e 编辑 , crontab -r 删除 , crontab -l 列出任务 + +** * * * :* 分别代表 分钟 , 小时 , 天 , 月 , 星期 + + + + + -- Gitee From 693c0061974db5bb4623c1da1da40d10c99f0e17 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 12 Jun 2024 11:34:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\345\215\242\347\216\211\345\215\216/20240606.wsd" | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git "a/\345\215\242\347\216\211\345\215\216/20240606.wsd" "b/\345\215\242\347\216\211\345\215\216/20240606.wsd" index e69de29..06e5fb1 100644 --- "a/\345\215\242\347\216\211\345\215\216/20240606.wsd" +++ "b/\345\215\242\347\216\211\345\215\216/20240606.wsd" @@ -0,0 +1,10 @@ +@startmindmap bb + +*[#FF0000] 权限修改命令 + *[#F0BBFF] chmod + * "change owner" 的缩写 + * 主要用于修改文件(或目录)的所属组 + *[#F0BBFF] chorp + *[#F0BBFF] chown + +@endmindmap \ No newline at end of file -- Gitee From 416c330d298dc74e614fddeae7d235803cfeb896 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 13 Jun 2024 11:12:07 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...57\345\242\203\345\217\230\351\207\217.md" | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 "\345\215\242\347\216\211\345\215\216/20240613\347\216\257\345\242\203\345\217\230\351\207\217.md" diff --git "a/\345\215\242\347\216\211\345\215\216/20240613\347\216\257\345\242\203\345\217\230\351\207\217.md" "b/\345\215\242\347\216\211\345\215\216/20240613\347\216\257\345\242\203\345\217\230\351\207\217.md" new file mode 100644 index 0000000..b4bb800 --- /dev/null +++ "b/\345\215\242\347\216\211\345\215\216/20240613\347\216\257\345\242\203\345\217\230\351\207\217.md" @@ -0,0 +1,43 @@ +## 周期任务 + +*: 表示每个 + +— : 表示范围 + +? : 表示任意值 + +/ : 前面表示开始时间,后面表示间隔时间 + +## 环境变量 + +概念 : 就是提供一系列可供特殊环境的全局变量 + +常用环境变量: + +PATH: 决定了系统在哪些目录中查找可执行文件 + +LANG:指定系统的默认语音 + +EDITOR + +HOME:指定当前用户的主目录 + +## 分类 + +按生命周期分: + ++ 永久环境变量 + +``` +vim .bashrc ---->export EDITOR=vim + +etc/profile.d/xxx.sh +``` + ++ 临时环境变量(export命令设置) + +按作用域分: + ++ 系统级环境变量 + ++ 用户级环境变量(~/.bashrc) \ No newline at end of file -- Gitee From 123c8d9faed6c1a0388ba6b2d3a8148ad1a494be Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Jul 2024 17:39:19 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...33\347\250\213\347\256\241\347\220\206.md" | 13 ++++++++ ...15\345\212\241\347\256\241\347\220\206.md" | 9 +++++ ...51\350\247\243\345\216\213\347\274\251.md" | 33 +++++++++++++++++++ ...0701Linux\345\256\211\350\243\205MySQL.md" | 23 +++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 "\345\215\242\347\216\211\345\215\216/20240617\350\277\233\347\250\213\347\256\241\347\220\206.md" create mode 100644 "\345\215\242\347\216\211\345\215\216/20240619\346\234\215\345\212\241\347\256\241\347\220\206.md" create mode 100644 "\345\215\242\347\216\211\345\215\216/20240624\345\216\213\347\274\251\350\247\243\345\216\213\347\274\251.md" create mode 100644 "\345\215\242\347\216\211\345\215\216/20240701Linux\345\256\211\350\243\205MySQL.md" diff --git "a/\345\215\242\347\216\211\345\215\216/20240617\350\277\233\347\250\213\347\256\241\347\220\206.md" "b/\345\215\242\347\216\211\345\215\216/20240617\350\277\233\347\250\213\347\256\241\347\220\206.md" new file mode 100644 index 0000000..93a32c8 --- /dev/null +++ "b/\345\215\242\347\216\211\345\215\216/20240617\350\277\233\347\250\213\347\256\241\347\220\206.md" @@ -0,0 +1,13 @@ +## 进程管理 + +查看进程:使用 ps 命令或 top 命令 + +启动进程:在终端中输入要运行的命令 + +后台运行进程:使用 & 符号 + +暂停和恢复进程:使用 Ctrl+Z 键盘组合,然后使用 bg 命令将其放入后台运行 + +终止进程:使用 kill 命令 + +查找进程信息:使用 ps 命令,并提供进程的 PID \ No newline at end of file diff --git "a/\345\215\242\347\216\211\345\215\216/20240619\346\234\215\345\212\241\347\256\241\347\220\206.md" "b/\345\215\242\347\216\211\345\215\216/20240619\346\234\215\345\212\241\347\256\241\347\220\206.md" new file mode 100644 index 0000000..56366bf --- /dev/null +++ "b/\345\215\242\347\216\211\345\215\216/20240619\346\234\215\345\212\241\347\256\241\347\220\206.md" @@ -0,0 +1,9 @@ +## 日常管理命令 + +启用:systemctl start 服务名称 + +停用:systemctl stop 服务名称 + +重启:systemctl restart 服务名称 + +状态:systemctl status 服务名称 \ No newline at end of file diff --git "a/\345\215\242\347\216\211\345\215\216/20240624\345\216\213\347\274\251\350\247\243\345\216\213\347\274\251.md" "b/\345\215\242\347\216\211\345\215\216/20240624\345\216\213\347\274\251\350\247\243\345\216\213\347\274\251.md" new file mode 100644 index 0000000..1e09d02 --- /dev/null +++ "b/\345\215\242\347\216\211\345\215\216/20240624\345\216\213\347\274\251\350\247\243\345\216\213\347\274\251.md" @@ -0,0 +1,33 @@ +## 压缩文件或目录 + +tar -czvf 压缩文件名.tar.gz 要压缩的文件或目录 + +-c:创建新的 tar 归档文件 + +-z:使用 gzip 压缩算法 + +-v:显示详细信息 + +-f:指定归档文件名 + +## 解压缩文件 + +tar -xzvf 归档文件名.tar.gz + +-x:从 tar 归档文件中提取文件 + +-z:使用 gzip 解压缩算法 + +-v:显示详细信息 + +-f:指定归档文件名 + +## 磁盘管理 + +Linux 磁盘管理常用三个命令为 df、du 和 fdisk + +df:检查文件系统的磁盘空间占用情况 + +du:Linux du 命令也是查看使用空间的,但是与 df 命令不同的是 Linux du 命令是对文件和目录磁盘使用的空间的查看 + +fdisk:是 Linux 的磁盘分区表操作工具 \ No newline at end of file diff --git "a/\345\215\242\347\216\211\345\215\216/20240701Linux\345\256\211\350\243\205MySQL.md" "b/\345\215\242\347\216\211\345\215\216/20240701Linux\345\256\211\350\243\205MySQL.md" new file mode 100644 index 0000000..83ebede --- /dev/null +++ "b/\345\215\242\347\216\211\345\215\216/20240701Linux\345\256\211\350\243\205MySQL.md" @@ -0,0 +1,23 @@ +## Debian 安装mysql 8.0 + +以Debian12 安装mysql 8.0为例,梳理安装过程: + +下载mysql的deb包 + +1.Linux本机下载 - wget http://mysql... + +2.非Linux本机下载 - 下载以后使用scp上传到指定目录 + +eg:scp mysql-apt-config_0.8.30-1_all.deb root@ip:/root + +更新:apt update + +安装deb包,形成软件源文件 /etc/apt/sources.list.d/mysql.list + +dpkg -i + +安装mysql apt install mysql-server + +重启服务:systemctl start mysql + +安装完成后,使用如下命令可以本地连接到数据库 mysql -u root -p \ No newline at end of file -- Gitee