首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

Linux服务器治理常用命令

2012-06-29 
Linux服务器管理常用命令iptables屏蔽单个IP的命令是 ?iptables -I INPUT -s 124.115.0.199 -j DROP???修

Linux服务器管理常用命令

iptables屏蔽单个IP的命令是

?

iptables -I INPUT -s 124.115.0.199 -j DROP

?

?

?

修改系统时间

?

date -s 15:27:30

clock -w

?

查看物理CPU个数

?

cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l

?

每个物理CPU中core的个数

?

cat /proc/cpuinfo | grep 'cpu cores' | uniq

?

逻辑CPU的个数

?

cat /proc/cpuinfo | grep "processor" | wc -l

?

逻辑CPU的个数=物理CPU×核数,如果不相等,表示服务器CPU支持超线程技术。

?

查看服务器型号

?

dmidecode |grep "Name"

?

?

查看系统是32位还是64位,有/lib64,表示系统为64位。无则表示系统为32位

?

ls -lF / | grep /$

?

查找PCI设置

?

lspci | grep Ether

?

查看特定端口的情况

?

losf -i:22

?

查看登录时间

?

查看系统启动信息

?

dmesg or dmesg | grep error

?

查看使用者登录时间

?

lastlog

?

查看设置系统服务

?

ntsysv, setup

?

删除某个时间以前文件,可以加到/etc/crontab

?

find /home/backup -type f -mtime +60 -exec rm -f {} \;

?

待增加.....

热点排行