收集linux下需要多次google的命令
编码问题
1
| iconv -f UTF-16 -t UTF-8 file_name
|
web开发命令
1
| curl -H "Content-Type: application/json"--data @body.json http://localhost:8080/ui/webapp/conf
|
1
| curl -H "Content-Type: application/json"-d '{"username":"xyz","password":"xyz"}' http://localhost:3000/api/login
|
系统时间
1
2
3
| ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
vim /etc/sysconfig/clock
ZONE="Asia/Shanghai"
|
1
2
| timedatectl list-timezones | grep Asia
timedatectl set-timezone Asia/Shanghai
|
系统状态
1
| lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more
|
程序
1
| mongoexport -u crossflow -p '0701!1523#SH' -authenticationDatabase admin -d bpc -c main_app_datapath -o main_app_datapath.json
|
shell 处理
1
| export CURRENT_PATH=$(cd "$(dirname "$0")"; pwd)
|
1
2
| CURRENT_LOAD=`top -b -n 1|grep 'load average'|awk '{print $12}'|sed 's/,//'`
declare -i current_load=${CURRENT_LOAD%.*}
|
1
| find /usr/lib64 -name '*.so' -o -name '*.so.1'
|
文本处理