diff --git a/.github/workflows/get-mhy-wish.yml b/.github/workflows/get-mhy-wish.yml index 03ba9dc78d..7be829d2c2 100644 --- a/.github/workflows/get-mhy-wish.yml +++ b/.github/workflows/get-mhy-wish.yml @@ -4,6 +4,7 @@ on: branches: - master - dev-py + - dev-game paths: - "script/requirements.txt" - ".github/workflows/get-mhy-wish.yml" diff --git a/game/public/image/zzz/characters/burnice.png b/game/public/image/zzz/characters/burnice.png new file mode 100644 index 0000000000..b60579b35d Binary files /dev/null and b/game/public/image/zzz/characters/burnice.png differ diff --git a/game/public/image/zzz/characters/caesar_king.png b/game/public/image/zzz/characters/caesar_king.png new file mode 100644 index 0000000000..75b4d36eb2 Binary files /dev/null and b/game/public/image/zzz/characters/caesar_king.png differ diff --git a/game/public/image/zzz/characters/full/burnice.png b/game/public/image/zzz/characters/full/burnice.png new file mode 100644 index 0000000000..257ca9f6e7 Binary files /dev/null and b/game/public/image/zzz/characters/full/burnice.png differ diff --git a/game/public/image/zzz/characters/full/caesar_king.png b/game/public/image/zzz/characters/full/caesar_king.png new file mode 100644 index 0000000000..782fee454b Binary files /dev/null and b/game/public/image/zzz/characters/full/caesar_king.png differ diff --git a/game/public/image/zzz/characters/half/burnice.png b/game/public/image/zzz/characters/half/burnice.png new file mode 100644 index 0000000000..257ca9f6e7 Binary files /dev/null and b/game/public/image/zzz/characters/half/burnice.png differ diff --git a/game/public/image/zzz/characters/half/caesar_king.png b/game/public/image/zzz/characters/half/caesar_king.png new file mode 100644 index 0000000000..782fee454b Binary files /dev/null and b/game/public/image/zzz/characters/half/caesar_king.png differ diff --git a/life/.vitepress/data/recent.json b/life/.vitepress/data/recent.json index 8d9d3a7080..ca50767270 100644 --- a/life/.vitepress/data/recent.json +++ b/life/.vitepress/data/recent.json @@ -1,6 +1,12 @@ { "title": "", "items": [ + { + "title": "cmd", + "desc": "cmd 系统常用 system base info uname uname -a uname -m", + "link": "/code/os/linux/command", + "date": "2024-05-21" + }, { "title": "Git", "desc": "Git sol does not point to a valid object 详细描述 git", @@ -114,12 +120,6 @@ "desc": "GitHub hub 自动建仓 clone private repo github clone p", "link": "/code/version-ctrl/github", "date": "2024-06-17" - }, - { - "title": "配环境", - "desc": "配环境 简单参考一下 当你获得一台全新机器,根据系统不同,可以参考下方的开发环境配置 Linux", - "link": "/tools/nipeima", - "date": "2024-07-12" } ] } \ No newline at end of file diff --git a/life/code/os/linux/command.md b/life/code/os/linux/command.md index adee18394e..8ccdb66f54 100644 --- a/life/code/os/linux/command.md +++ b/life/code/os/linux/command.md @@ -1,10 +1,12 @@ # cmd +:::tip 系统常用 [system base info](./sys_base_info) `uname` `uname -a` `uname -m` +::: -## 常用 +:::warning 常用 - 显示文件夹大小`du -sh */` 其中,du是查看磁盘使用情况的命令;-s选项表示只显示总大小;-h选项表示以易读的方式显示文件夹大小,即以B、KB、MB等单位显示;*/表示只匹配目录名称,表示当前目录下所有子目录。 - `du -h --max-depth=1 | sort -h` 其中,--max-depth=1选项表示只显示当前目录下一级的目录和文件大小。sort命令用于排序。-h选项表示将大小以人类可读的方式排序,即以B、KB、MB等单位排序。默认情况下,sort命令按字典序排序。 @@ -12,6 +14,8 @@ - 查看端口占用情况 `sudo lsof -i :8888` - 只显示文件名 `ls -l | awk '{print $9}'` +::: + ## ls list directory contents, 用于显示指定工作目录下之内容(列出目前工作目录所含之文件及子目录)。 @@ -178,6 +182,48 @@ mode 权限设定字串,格式如下 `killall -9 pid` +## top + +`htop` 查看所有图形显示界面 + +:::tip 概览区域通常包含以下信息 + +- **当前时间和系统启动时间**:如`top - 14:07:53 up 256 days, 3:35`,表示当前时间为14:07:53,系统已运行256天3小时35分钟。 +- **登录用户数**:如`1 user`,表示当前有1个用户登录。 +- **系统负载**:如`load average: 0.07, 0.03, 0.00`,分别表示过去1分钟、5分钟、15分钟的系统平均负载。 +- **任务统计**:如`Tasks: 162 total, 1 running, 161 sleeping, 0 stopped, 0 zombie`,表示系统中共有162个进程,其中1个正在运行,161个在睡眠,0个停止,0个僵尸进程。 +- **CPU使用情况**:如`%Cpu(s): 0.2 us, 0.1 sy, 0.0 ni, 99.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st`,详细列出了CPU在不同状态下的使用时间百分比。 +- **内存和交换空间使用情况**:包括物理内存(MiB Mem)和虚拟内存(MiB Swap)的总量、空闲量、使用量等信息。 +::: + +任务区域显示当前运行的进程列表,通常包含以下字段: + +- **PID**:进程ID。 +- **USER**:进程所有者的用户名。 +- **PR**:进程优先级。 +- **NI**:nice值,负值表示高优先级,正值表示低优先级。 +- **VIRT**:进程使用的虚拟内存总量(以KB为单位)。 +- **RES**:进程当前正在使用的、未被换出的物理内存大小(以KB为单位)。 +- **SHR**:共享内存总大小(以KB为单位)。 +- **S**:进程状态,如R(运行)、S(睡眠)等。 +- **%CPU**:自上次屏幕更新以来任务占用的CPU时间份额,表示为总CPU时间的百分比。 +- **%MEM**:进程使用的物理内存百分比。 +- **TIME+**:CPU时间,显示任务自启动以来占用的CPU总时间。 +- **COMMAND**:命令行名称或程序名称。 + +:::warning 交互式命令 + +- **P**:按照CPU使用率排序。 +- **M**:按照内存使用率排序。 +- **T**:按照进程运行时间排序。 +- **k**:终止指定的进程(需要输入进程ID)。 +- **d**:改变信息更新的时间间隔(单位为秒)。 +- **q**:退出top命令。 +- **h**或**?**:显示帮助信息。 +- **1**: 查看每个逻辑CPU使用情况 + +::: + ## tar - zip `tar -zcvf zip.tar.gz zip/` @@ -185,6 +231,11 @@ mode 权限设定字串,格式如下 - unzip .tar.bz2 `tar -jxvf zip.tar.bz2` - unzip .tat.xz `tar -xvf zip.tar.xz` +## pwd + +pwd 获取当前位置 +获取文件的真实路径,可以用 `realpath file` + ## pidof `pidof + pid` diff --git a/script/auto/latest.json b/script/auto/latest.json index 32e0cf1211..3f5fdf4f1a 100644 --- a/script/auto/latest.json +++ b/script/auto/latest.json @@ -1,4 +1,8 @@ { + "life/code/os/linux/command.md": { + "title": "cmd", + "date": 1716266651 + }, "life/code/version-ctrl/git.md": { "title": "Git", "date": 1721311884.0 @@ -419,10 +423,6 @@ "title": "线性代数", "date": 1716273280 }, - "life/code/os/linux/command.md": { - "title": "cmd", - "date": 1716266651 - }, "life/code/program/future/prepare.md": { "title": "Prepare", "date": 1716266651 diff --git a/script/hoyolab.py b/script/hoyolab.py index e3e1427727..9914e5bf54 100644 --- a/script/hoyolab.py +++ b/script/hoyolab.py @@ -586,8 +586,8 @@ def get_post_id_url(gid: GameID, post_id: list): for id in list_id: url = get_post_url(id) get_official_json(gid, url) - # 每种只获取最新的,一个就够用了 - break + # # 每种只获取最新的,一个就够用了 + # break def main(): diff --git a/temp/.gitignore b/temp/.gitignore index 345ecbe208..689eb1f5bb 100644 --- a/temp/.gitignore +++ b/temp/.gitignore @@ -6,3 +6,5 @@ node_modules/ .vitepress/.cache/ .vitepress/.temp/ .vitepress/dist/ + +public/img/ \ No newline at end of file