Java程序员入门技术大全V1(十九) -- Liunx之常用命令

  1. Liunx
    1. 常用命令

Liunx常用命令:

https://www.runoob.com/w3cnote/linux-common-command-2.html

 

Liunx命令大全

https://man.linuxde.net/

 

Cup、内存、磁盘空间

top

free -h

df –h

fdisk –l

 

端口监控:

netstat -nat|grep ESTABLISHED|wc -l

netstat -nat|grep -i ":80" | grep EST |wc -l

netstat -ano | find "95.87:80" | find "EST" /c

 

进程:

ps –ef | grep java

 

线程数:

ps -eLf | wc -l

ps -eLf | grep java | wc –l

 

压缩和解压缩命令

tar
  解包:tar zxvf filename.tar
  打包:tar czvf filename.tar dirname

zip命令
    解压:unzip filename.zip
    压缩:zip filename.zip dirname

 

防护墙:

vi /etc/sysconfig/iptables

重启防火墙:service iptables restart  

查看状态:service iptables status

关闭防火墙:service iptables stop

 

防护墙(新):

查看所有打开的端口:

firewall-cmd --zone=public --list-ports

添加端口:

firewall-cmd --zone=public --add-port=80/tcp --permanent

更新防火墙规则:

firewall-cmd --reload

查状态:

systemctl status firewalld

 

文件查看:

tail –f xxx.log

tail –n 100 xxx.log

 

scp :

参考:https://www.runoob.com/linux/linux-comm-scp.html

样例:scp /opt/intf/test.jar root@192.168.0.11:/opt/intf

RPM命令:

rpm -ivh your-package                # 直接安装

rpm -ql tree                                 # 查询

rpm -e tree                                # 卸载

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值