gdufo

           

          Linux常用到的命令

           

          ==手支啟動Apache2

          shell> /usr/local/apache2/bin/apachectl start <=激活

          apachectl 還有其它的參數如下:
          apachectl stop
          :停止 WWW 的服務;
          apachectl restart
          :重新激活 WWW 的服務,這個指令比較常用在你修改了 apache 的參數后,重新激活用的。
          apachectl status
          :偵測 WWW 的狀態。

          ==刪除目錄

          shell> rm –rf 目錄

          ==新建目錄

          shell> mrdir 目錄

          ==Copy文件

          shell>cp  /home/weixubin/mysqltest.php  /usr/local/apache2/htdocs

          ==Copy目錄

          shell>cp -R /home/xubin.wei/crm /usr/local/apache/htdocs/crm

          ==Copy目錄下指定格式

          shell>cp /home/test/*.zip /usr/pwservices/

          ==文件所屬

          shell>chown -R nobody.nobody /usr/local/apache2/htdocs/crm

          ==更改文件屬性

          shell>chmod -R 777 /usr/local/apache2/htdocs/crm

           

          ==查看是否已安裝程序

          shell>rpm –q mysql

          ==刪除一程序

          shell>rpm –e mysql-3.23

           

           

          ==文件夾 Rename

          shell>mv  apache-ant-1.5.4  ant

          ==啟動postgresql

          shell> /usr/local/pgsql/bin/postmaster –I (小寫) -D /home/postgre/data

          ==偵測端口是否被占用

          shell>netstat -an | grep 389

          ==從根目錄查找文件,并顯示。

          Shell>find / -name alert*.log –print

           

          ==查看進程

          Shell> ps -ef | grep mysql

           

          ==查看磙盤空間大小

          Shell>df h

           

          ==修復

          Shell>fsck t ext2 /dev/ext2

           
           

          ==定位文件

          shell> locate my.cnf

          shell>vi my.cnf 編輯文件

          編輯:Insert

          命令狀態;ESC

          :wq保存

           

          ==增加組

          shell>groupadd mysql

           

          ==查看全路徑

          shell>pwd

          posted on 2008-07-04 13:07 gdufo 閱讀(297) 評論(0)  編輯  收藏 所屬分類: Linux

          導航

          統計

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          收藏夾

          Hibernate

          友情鏈接

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 祁连县| 桃源县| 兰考县| 阜康市| 永安市| 南通市| 温泉县| 定日县| 武城县| 石棉县| 广东省| 运城市| 平邑县| 汝州市| 色达县| 阜新市| 安龙县| 巢湖市| 乐东| 青州市| 唐山市| 临朐县| 桃园市| 临邑县| 龙门县| 彰化市| 天津市| 界首市| 涪陵区| 琼中| 和静县| 磴口县| 铜陵市| 嘉鱼县| 四会市| 汉寿县| 百色市| 康平县| 文水县| 雷波县| 图木舒克市|