隨筆-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 on 2008-06-04 11:27 rox 閱讀(396) 評論(1)  編輯  收藏

          評論:
          # re: 一些常用的linux命令 2010-03-10 13:38 | rox
          補充和參考:
          linux通過ntpdate網絡校時
          http://hi.baidu.com/bubu600/blog/item/e299aa595a2709212834f0ae.html
          crontab -e
          10 5 * * * root ntpdate 192.168.0.2 ;hwclock -w
          這樣每天5:10自動進行網絡校時


          linux時間同步操作
          http://bbs.linuxpk.com/viewthread.php?tid=27911
          使用了端口 123
          iptables -I INPUT -p udp -m udp --sport 123 -j ACCEPT

          Centos 時間同步
          http://www.javaeye.com/topic/599648
          中國國家授時中心:
          http://www.time.ac.cn/stime.asp

          其他網絡時間服務器地址如下:(也可以自己去搜索下)

          time.nist.gov (美國)
          ntp.fudan.edu.cn (復旦) )(國內用戶推薦使用此服務器)
          timekeeper.isi.edu
          subitaneous.cpsc.ucalgary.ca
          usno.pa-x.dec.com
          time.twc.weather.com
          swisstime.ethz.ch
          ntp0.fau.de
          ntp3.fau.de
          time-a.nist.gov
          time-b.nist.gov
          time-nw.nist.gov
          nist1-sj.glassey.com

          210.72.145.44 也是一個不錯的地址,速度很快!
            回復  更多評論
            

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 夹江县| 澳门| 桃源县| 应城市| 潍坊市| 温宿县| 慈利县| 蒲江县| 裕民县| 襄汾县| 海安县| 临沂市| 贵溪市| 张家界市| 灵武市| 栾城县| 红原县| 新泰市| 吕梁市| 大姚县| 文登市| 灵丘县| 旬阳县| 成都市| 土默特左旗| 台安县| 贵阳市| 集贤县| 阳东县| 巴里| 抚宁县| 永新县| 高要市| 科尔| 咸丰县| 澄江县| 甘德县| 宜川县| 原平市| 灵寿县| 额敏县|