随笔-46  评论-54  文章-0  trackbacks-0
  置顶随笔
1、同步系统时间(可以用的)
1/usr/sbin/ntpdate time.windows.com
2、查询80端口被哪些程序占用
1netstat -antp|grep 80
3、查看目录下各自磁盘占用空间
1du --max-depth=1 -h /appsvr/xjjhr_tomcat-5.5.20/jobhn2/ROOT
4、tar打包和解压
1tar -cvfz ***.tar /sourcefolder
2tar -xvfz ***.tar -C targetfolder
5、编辑iptables
1vi etc/sysconfig/iptables
6、rpm安装、卸载、列表和查询mysql安装
1rpm -ivh 
2rpm -ev --nodeps
3rpm -ql xxx.rpm
4rpm -qa|grep -i mysql
7、查看redhat版本
1cat /etc/redhat_release
8、查看cpu速度
1cat /proc/cpuinfo
9、删除/data/projects/myproject/目录(及其子目录下)的所有.svn目录
1find /data/projects/myproject/ -name .svn |xargs rm -rf
10、修改网卡IP,并重启
1vi /etc/sysconfig/network-scripts/ifcfg-eth0
2service network restart
11、查看tomcat日志文件的最后200行
1tail -200 /apache_tomcat-5.5.20/logs/catalina.out
12、修改当前默认语言
1export LANG=en_US
2export LC_ALL=en_US
3修改系统的:
4cat ~/.bash_profile
13、安装和卸载U盘
1fdisk -l
2mount /dev/sdc1 /mnt
3umount /mnt
4umount -/mnt (等空闲后卸载)
14、修改系统启动参数
1 vi ~/.bash_profile
2 vi /etc/rc.local
3 vi /etc/profile
4 修改后即时生效
5 . ~/.bash_profile
6 . /etc/rc.local
7 . /etc/profile

15、查看8100端口的访问统计

1 netstat -na |grep 8100 |wc -l
2 netstat -tunlap|grep 80
16、修改系统时间
1 date -s "11/20/2003 12:48:00"
2 date +%Y%m%d%T -s "20081225 10:05:00"

17、查看系统IO瓶颈
1 sudo iotop -Pm / 

posted @ 2008-06-04 11:27 rox 阅读(379) | 评论 (1)编辑 收藏
仅列出标题  下一页