http://192.168.200.10/index1.html
http://192.168.200.10/index2.html
http://192.168.200.20/index1.html
http://192.168.200.30/index1.html
http://192.168.200.40/index1.html
http://192.168.200.30/order.html
http://192.168.200.10/order.html
答案: cat t.txt | cut -d ‘/’ -f 3 | sort | uniq -c | sort -nr
netstat -an | grep ESTABLISHED | awk -F " " ‘{print $5}’ | cut -d “:” -f 1 | sort | uniq -c| sort -nr
cat access.log | awk -F " " ‘{print $1}’ | sort | uniq -c | sort -nr | head -2
tcpdump.log , 用做将来数据分析(美团) >>
tcpdump -i ens33 host 192.168.200.1 and port 22 >> /home/tcpdump.log
rewrite 模块,实现重写功能
access 模块:来源控制
ssl 模块:安全加密
ngx_http_gzip_module:网络传输压缩模块ngx_http_proxy_module 模块实现代理
ngx_http_upstream_module 模块实现定义后端服务器列表
ngx_cache_purge 实现缓存清除功能
需要操作时再打开。【演示 比如: 锁定 /etc/passwd 让任何用户都不能随意 useradd,除非解除锁定】
用户 tom 对目录 /home/test 有执行 x 和读 r 写 w 权限,/home/test/hello.java 是只读文件,问 tom 对 hello.java 文件能读吗(ok)? 能修改吗(no)?能删除吗?(ok)
用户tom 对目录 /home/test 只有读写权限,/home/test/hello.java 是只读文件,问tom 对 hello.java 文件能读吗(no)? 能修改吗(no)?能删除吗(no)?
用户 tom 对目录 /home/test 只有执行权限 x,/home/test/hello.java 是只读文件,问 tom 对 hello.java 文件能读吗(ok)? 能修改吗(no)?能删除吗(no)?
用户 tom 对目录 /home/test 只有执行和写权限,/home/test/hello.java 是只读文件,问 tom 对 hello.java 文件能读吗(ok)? 能修改吗(no)?能删除吗(ok)?
netstat //网络状态监控 top //系统运行状态 lsblk //查看硬盘分区 find
ps -aux //查看运行进程 chkconfig //查看服务启动状态 systemctl //管理系统服务器
top, iotop, df -lh , netstat -tunlp , ps -aux | grep 关心的进程
张三 40
李四 50
王五 60
cat t2.txt | awk -F " " ‘{sum+=$2} END {print sum}’
if [ -f 文件名 ] then echo “存在” else echo “不存在” fi
9 8 7 6 5 4 3 2 10
sort -nr t3.txt | awk '{sum+=$0; print $0} END {print "和="sum}
grep -r “cat” /home |cut -d “:” -f 1
find /home/test -name “.” | wc -l
find /home/test -name “.” | xargs wc -l
Nginx Haproxy Keepalived LVS