feat: 新增 file/svc/archive/sys/log/fw 分组并扩充 net、proc

- file:findbig 按大小、findrecent 按修改时间、findname 按名称查找文件
- svc:systemctl / launchctl / sc 统一接口,status、enable、disable、logs
- archive:按扩展名自动识别格式并解压,支持 tar.gz/tgz/tar.bz2/tar.xz/tar/zip/gz
- sysinfo:OS、CPU、内存、磁盘一览
- log:journalctl / log show / wevtutil 搜索关键字与查看最近日志
- fw:ufw / firewalld / iptables / ALF / netsh 统一接口,status、allow、deny
- net 新增 ping、trace(mtr 优先)、dns(dig 优先)、curl HTTP 诊断
- proc 新增 topmem、topcpu、killname
- 危险操作(svc enable/disable、proc killname、fw allow/deny)需 --yes 确认
- 注册表、executor 派发表、cli 分组说明与 README 同步更新
This commit is contained in:
2026-11-02 22:42:18 +08:00
parent 038926e2dd
commit 400812d114
21 changed files with 2870 additions and 14 deletions
+41
View File
@@ -0,0 +1,41 @@
# archive - 压缩文件
自动识别压缩格式并解压,不用记 `tar -xzf` / `tar -xjf` / `unzip` 的区别。
## 命令
| 命令 | 作用 |
| --- | --- |
| `kopsc archive extract <文件> [--dir 目录]` | 自动识别格式并解压 |
别名:`kopsc archive unzip`、`kopsc archive untar`
## 支持的格式
| 扩展名 | 解压方式 |
| --- | --- |
| `.tar.gz` / `.tgz` | Go 内置实现 |
| `.tar.bz2` / `.tbz2` | 调用 `bzip2 -dc` + tar 解析 |
| `.tar.xz` / `.txz` | 调用 `xz -dc` + tar 解析 |
| `.tar` | Go 内置实现 |
| `.zip` / `.jar` / `.war` | Go 内置实现 |
| `.gz` | Go 内置 gzip 解压 |
## 示例
```bash
# 解压到当前目录
kopsc archive extract app.tar.gz
# 解压到指定目录
kopsc archive extract backup.zip --dir /opt/backup
# 解压 tar.bz2
kopsc archive extract data.tar.bz2
```
## 选项
| 选项 | 说明 |
| --- | --- |
| `--dir` / `-d` / `-C` | 目标目录(默认当前目录) |