Linux 命令

[root@bogon bin]# yum search netstat   // 查找netstat命令 在 哪个包里

已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.sohu.com
* extras: mirrors.sohu.com
* updates: mirrors.sohu.com
================================ 匹配:netstat =================================
dstat.noarch : Versatile resource statistics tool
net-snmp.x86_64 : A collection of SNMP protocol tools and libraries
net-tools.x86_64 : Basic networking tools
[root@bogon bin]# yum search netstat^C

 

[root@bogon bin]# yum install net-tools //安装相关包

查看ip地址 : ip addr

查看网络配置:1、 cd /etc/sysconfig/network-scripts  2、找到里面的   ifcfg-enp0* 的文件  3、vi 编辑

配置IP地址:

firewall防火墙: 

  查看防火墙状态 systemctl status firlwalld   启用防火墙 service firewalld start  重启防火墙 service firewalld restart 关闭防火墙 service firewalld stop

       centos7 开机禁用防火墙自启命令 : systemctl disable firewalld.service

       centos7 防火墙随系统开启启动  : systemctl enable firewalld.service

测试连接:ping erbao.site

查看网络端口占用情况同时显示进程: netstat -ntshanlp

删除修改时间七天以前的文件:  

   1、进入要删除的目录

   2、执行: find * -type f -mtime +7 -exec rm {} \;

删除乱码文件

1、进入要删除的目录

2、ls -li 可以查看 文件的节点号 如 1180447

3、执行:find ./ -inum 1180447 -exec rm -rf {} \;

 

posted @ 2020-06-15 15:47  新进社员  阅读(100)  评论(0编辑  收藏  举报