《Linux實(shí)用命令手冊(cè)》
提示: 本材料只做個(gè)人學(xué)習(xí)參考,不作為系統(tǒng)的學(xué)習(xí)流程,請(qǐng)注意識(shí)別!!!
1. 命令
1.1 AWK
#求和
grep '2022-09-21' 0921 | grep '識(shí)別開始' | awk -F 'mobileList.size:' '{sum += $2} END {print sum}'
#過濾輸出
zcat info-2022-11-06-11.log.gz | grep '識(shí)別成功' | awk -F 'time:' '{print $2}'| awk -F 'ms' '{if($1>200) print $1}'
#過濾計(jì)數(shù)
grep '27509' /logs/app.log | awk -F 'API調(diào)用總耗時(shí):' '{ print $2}'|awk -F ', ' '{if ($1 >50) print $0}' |wc -l
#
zcat app.log.2022-09-20-* | grep '客戶262943真實(shí)IP' | awk -F'客戶262943真實(shí)IP為:' '{print $2}' | sort | uniq -c
# 求和、計(jì)數(shù)、計(jì)算平均耗時(shí)
grep '詳細(xì)版' app.log | awk -F '調(diào)用總耗時(shí):' '{print $2}' | awk -F ',' '{sum += $1; count+=1; } END {print "sum="sum, "count="count, "ave="sum/count}'
1.2 獲取服務(wù)器出口ip
curl ipinfo.io
或者
curl icanhazip.com
curl ifconfig.me
curl curlmyip.com
curl ip.appspot.com
curl ipinfo.io/ip
curl ipecho.net/plain
curl www.trackip.net/i
1.3 curl
- 表單post提交:
- 示例一:
curl localhost:8765/open/credit/moresale -X POST -d ‘mobile=15261915041&sinceDate=20211221’
- json方式post提交:
- 示例一:
curl -H “Content-Type:application/json” -H “Data_Type:msg” -X POST --data ‘{“app_id”:“11111”,“timestamp”:1640568668,“signature”:“dda87982b73b30d1e2abb00ac8f321c91e716006”,“phones”:[“13400000000”]}’ http://127.0.0.1:8080/api/getInfo文章來源:http://www.zghlxwxcb.cn/news/detail-485224.html
1.4 目錄掛載
mount -t nfs 172.16.43.56:/data/files1 /data/files
172.16.43.56: nfs服務(wù)ip
/data/files1: nfs共享目錄
/data/files: 掛載目錄文章來源地址http://www.zghlxwxcb.cn/news/detail-485224.html
到了這里,關(guān)于Linux實(shí)用命令手冊(cè)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!