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
+53
View File
@@ -0,0 +1,53 @@
# file - 文件查找
按大小、修改时间、名称查找文件,不用记 `find` 的复杂语法。
## 命令
| 命令 | 作用 |
| --- | --- |
| `kopsc file findbig [路径] [--threshold 大小]` | 查找大于指定阈值的文件,按大小排序 |
| `kopsc file findrecent [路径] [--days 天数]` | 查找最近 N 天内修改过的文件 |
| `kopsc file findname <模式> [路径]` | 按文件名查找(忽略大小写,支持 `*` `?` 通配符) |
## 示例
```bash
# 找当前目录下大于 100M 的文件(默认阈值)
kopsc file findbig
# 找 /var 下大于 500M 的文件
kopsc file findbig /var --threshold 500M
# 找最近 3 天修改过的文件
kopsc file findrecent --days 3
# 找 /var/log 下所有 .log 文件
kopsc file findname "*.log" /var/log
# 找所有 .conf 文件(忽略大小写)
kopsc file findname "*.CONF"
```
## 选项
### findbig
| 选项 | 默认值 | 说明 |
| --- | --- | --- |
| `--threshold` / `-s` | `100M` | 大小阈值,支持 K/M/G/T 后缀 |
| 位置参数 | `.` | 搜索路径 |
### findrecent
| 选项 | 默认值 | 说明 |
| --- | --- | --- |
| `--days` / `-d` | `7` | 天数 |
| 位置参数 | `.` | 搜索路径 |
### findname
| 选项 | 说明 |
| --- | --- |
| 第一个位置参数 | 文件名模式(必填) |
| 第二个位置参数 | 搜索路径(默认 `.`) |