摘要:
1.free h 以人类可读的形式显示 m 以MB为单位显示 w 将buffers和cache分开单独显示(针对centos7系统) centos6上: centos7上: s 动态查看内存信息的刷新时间间隔 c 一共要刷新多少次退出free 2.lscpu 显示关于cpu架构的信息 阅读全文
摘要:
1.iostat 实时显示linux的任务 centos7中默认没有安装iostat,所以得提前安装sysstat yum install y sysstat c 统计cpu信息 d 统计磁盘信息 N 统计nfs文件系统信息 h 使nfs统计信息更人类可读化 k 指定以Kb/s为单位显示 p 指定要 阅读全文
摘要:
1.head 默认查看文件前10行 head 7 /etc/yum.conf n num n7代表查看文件前7行 2.tail 默认查看文件的后10行 tail 7 /etc/yum.conf n num n7 代表查看文件后5行 f 实时查看文件更新内容,当文件被删除时,更新终止 tail f / 阅读全文
摘要:
指定单个ip,示例如下: iptables A INPUT s 192.168.2.85 j ACCEPT 指定多个源地址,用“逗号”隔开即可,示例如下: iptables t filter I INPUT s 192.168.2.85,192.168.2.235,192.168.2.102 j D 阅读全文
摘要:
#!/usr/bin/env python# -*- coding: utf-8 -*-import os dir = "/var/www/html/EnjoyWeekend/" if os.path.isdir(dir): print('%s is a dir' % dir)else: print 阅读全文