Skip to content

pulling refs/heads/dev-game into master #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/get-mhy-wish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- master
- dev-py
- dev-game
paths:
- "script/requirements.txt"
- ".github/workflows/get-mhy-wish.yml"
Expand Down
Binary file added game/public/image/zzz/characters/burnice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added game/public/image/zzz/characters/caesar_king.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions life/.vitepress/data/recent.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
]
}
53 changes: 52 additions & 1 deletion life/code/os/linux/command.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# 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命令按字典序排序。
- 显示磁盘占用情况 `df -h`
- 查看端口占用情况 `sudo lsof -i :8888`
- 只显示文件名 `ls -l | awk '{print $9}'`

:::

## ls

list directory contents, 用于显示指定工作目录下之内容(列出目前工作目录所含之文件及子目录)。
Expand Down Expand Up @@ -178,13 +182,60 @@ 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/`
- unzip `tar -zxvf zip.tar.gz`
- unzip .tar.bz2 `tar -jxvf zip.tar.bz2`
- unzip .tat.xz `tar -xvf zip.tar.xz`

## pwd

pwd 获取当前位置
获取文件的真实路径,可以用 `realpath file`

## pidof

`pidof + pid`
Expand Down
8 changes: 4 additions & 4 deletions script/auto/latest.json
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions script/hoyolab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 2 additions & 0 deletions temp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ node_modules/
.vitepress/.cache/
.vitepress/.temp/
.vitepress/dist/

public/img/