linux笔记

Posted 一条图图犬

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux笔记相关的知识,希望对你有一定的参考价值。

依赖问题 dependency related

 sudo apt install -f 自动安装依赖

 sudo dpkg -i filename.deb  安装deb安装包

系统监控 system monitoring

 top/iotop/powertop/nethogs 普通监控/按磁盘写入排序/按耗电量排序/按网络流量排序

ping www.baidu.com > test.log &
tail -n 5 -f test.log

某个命令在后台运行,并产生log, 监控log文件

watch

搜索查找 search and index

 

find
-name 按名称查找
> find . -name "[a-z]*[4-9].log"

-exec 对搜索出来的文件执行command
-ok 安全模式:对每一个command进行操作确认提示
> find path options -exec command options {} \;
> find path options -ok command options {} \;
```

 

 

网络相关 networks

 curl ifconfig.me 查看本机外网ip

 

 界面美化 inferface modify

 column -t 格式化输出命令的结果

自定义命令 bash aliases

 alias rsvmr="rsync -vcah src dst"   同步文件

 alias waitit="inotifywait -mrq --format ‘%Xe %w%f‘ -e modify,create,delete,attrib"  监控目录

 

以上是关于linux笔记的主要内容,如果未能解决你的问题,请参考以下文章