mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-16 20:21:22 +08:00
doc: update docker.md & linux-command.md & nginx.md (#838)
* doc: update linux-command.md * 增加代理构建 * 删除上次提交多余
This commit is contained in:
@ -24,6 +24,7 @@ Linux 命令速查表
|
||||
**`w`** | 显示系统中当前登录的用户
|
||||
**`whoami`** | 显示您的登录身份
|
||||
**`finger username`** | 显示有关用户的信息
|
||||
**`sed -ri 's/.*swap.*/#&/' /etc/fstab && swapoff -a`** | 关闭swap
|
||||
<!--rehype:className=style-list-->
|
||||
|
||||
### 硬件
|
||||
@ -332,6 +333,23 @@ Linux 命令速查表
|
||||
`Ctrl`+`N` (Down) | 下一条命令
|
||||
<!--rehype:className=left-align shortcuts-->
|
||||
|
||||
技巧
|
||||
---
|
||||
|
||||
### linux技巧
|
||||
<!--rehype:wrap-class=row-span-2 col-span-2-->
|
||||
|
||||
:--- | :---
|
||||
:----------------------------------------------| :---
|
||||
**`du -h / \| sort -rh \| head -20`** | 最大20个文件
|
||||
**`grep -Ev '^\s*($\|#\|;)' example.conf`** | 查看去掉注释和空行
|
||||
**`echo <passwd> \| passwd root --stdin`** | 单行改密码
|
||||
**`find /data/app/tmp -mtime +30 -name "*.flv" -exec rm -Rf {} \;`** | 删除30天前文件
|
||||
**`for file in $(ls); do sed -i 's/nmg/sz/g' "$file"; done`** | 当前目录修改字符串
|
||||
**`ssh -NfR remote_port:localhost:local_port user@remote_server`** | ssh代理
|
||||
**`find . -wholename "*.sh" -exec dos2unix {} \;`** | 修复脚本格式错误
|
||||
<!--rehype:className=left-align shortcuts-->
|
||||
|
||||
另见
|
||||
---
|
||||
|
||||
|
Reference in New Issue
Block a user