隨筆-46  評論-54  文章-0  trackbacks-0
          1、同步系統(tǒng)時間(可以用的)
          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、修改網(wǎng)卡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、修改當(dāng)前默認(rèn)語言
          1export LANG=en_US
          2export LC_ALL=en_US
          3修改系統(tǒng)的:
          4cat ~/.bash_profile
          13、安裝和卸載U盤
          1fdisk -l
          2mount /dev/sdc1 /mnt
          3umount /mnt
          4umount -/mnt (等空閑后卸載)
          14、修改系統(tǒng)啟動參數(shù)
          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端口的訪問統(tǒng)計

          1 netstat -na |grep 8100 |wc -l
          2 netstat -tunlap|grep 80
          16、修改系統(tǒng)時間
          1 date -s "11/20/2003 12:48:00"
          2 date +%Y%m%d%T -s "20081225 10:05:00"

          17、查看系統(tǒng)IO瓶頸
          1 sudo iotop -Pm / 

          posted on 2008-06-04 11:27 rox 閱讀(396) 評論(1)  編輯  收藏

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


          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

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

          time.nist.gov (美國)
          ntp.fudan.edu.cn (復(fù)旦) )(國內(nèi)用戶推薦使用此服務(wù)器)
          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 也是一個不錯的地址,速度很快!
            回復(fù)  更多評論
            

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 贵溪市| 肇东市| 日喀则市| 康乐县| 巫山县| 瑞昌市| 靖边县| 汉源县| 南宫市| 增城市| 武威市| 海城市| 白玉县| 五指山市| 塔城市| 榆林市| 雷山县| 基隆市| 庆阳市| 达州市| 娱乐| 长顺县| 桑植县| 姜堰市| 德惠市| 贡嘎县| 石首市| 丹东市| 米易县| 十堰市| 武定县| 嘉兴市| 那坡县| 新巴尔虎右旗| 新乐市| 昌图县| 惠来县| 会理县| 平武县| 防城港市| 炉霍县|