天的系统是centos7系统,所以总结的linux命令主要以centos7为主,会把常用的命令进行总结,持续更新。文件相关解压tar-xf压缩tar-zcvftest.tar.gz./test/压缩搜索文件find/-namenginx.conf文件授权chmod-R777文件读写权限firewall查看防火墙状态systemctlstatusfirewalld查看openfirewallPortfirewall-cmd--list-all开放端口3306firewall-cmd--zone=public--add-port=3306/tcp--permanent--zone#Scope--add-port=80/tcp#添加端口,格式就是:端口/通信协议–permanent#永久有效,没有这个参数,重启后就失效了重置防火墙firewall-cmd--reload运维查看占用内存前五的进程psauxw|sort-rn-k4|head-5查看前100行日志tail-fn100nohup.logvi最后一行shift+g查看当前目录文件夹大小du-h--max-depth=1查看运行端口netstat-nlp|grep8888deployjar包启动nohupjava-Dfile.encoding=utf-8-jar0923.jar>nohup.log2>&1&nginxstart:sudosystemctlstartnginxstopservice:sudosystemctlrestartnginxreloadservice:sudosystemctlreloadnginx
