作業系統 | LINUX及AIX常用命令__LINUX

來源:互聯網
上載者:User

本節主要整理了一些效能測試工作過程中經常會用到的LINUX及AIX命令。

 1 基本命令

pwd             查看目前的目錄

ls                 -a查看隱藏資訊 -l查看詳細資料

cd                轉到指定目錄

mkdir           建立目錄 

mkdir –p      建立多級目錄

rmdir            刪除目錄(不能刪除目前的目錄或父目錄且必須為空白)

rm -rf file      刪除檔案

clear            清屏

istat              查看檔案i_node表的資訊

touch            更新檔案的訪問和修改時間

date              列出當前日期時間

who              查看已登陸的使用者

who am i       查看目前使用者

su                 切換使用者

man              協助

vi file             建立/編輯檔案

exit                退出

cp source target    拷貝檔案

mv source target   移動檔案或重新命名

cat                          查看檔案內容

compress -v file     壓縮檔

uncompress file.z  解壓檔案

passwd                  修改口令

shutdown -h now   立刻關機

shutdown -r now    關閉並立刻重啟

reboot                     重啟



 2 查看連接埠串連數命令

netstat -an | find /i "8000" /c    Windows下查看8000連接埠的串連

netstat -an | grep 8000            Linux和Aix下查看8000連接埠的串連

netstat -an | grep 8000 |wc -l   自動統計linux和Aix連接埠號碼為8000的串連數



 3 更改許可權命令

chmod a-x myfile     rw- rw- rw-  收回所有使用者的執行許可權

chmod og-w myfile   rw- r-- r- -   收回同組使用者和其他使用者的寫入權限

chmod g+w myfile    rw- rw- r- -  賦予同組使用者寫入權限

chmod u+x myfile     rwx rw- r- - 賦予檔案屬主執行許可權(常用)

chmod go+x myfile   rwx rwx r- x 賦予同組使用者和其他使用者執行許可權



 4 拷貝檔案命令

//遠程目錄拷貝到本地

scp cata@108.199.2.201:/home/cata/nmon/nmon /home/oracle/nmon


//本地拷貝到遠程目錄

scp awr* cata@108.199.2.201:/home/cata/nmon


//windows下進入ftp模式拷貝

sftp cata@108.199.2.201

scp DB205_20150928* cata@108.199.2.201:/home/cata/nmon

scp DB206_20150928* cata@108.199.2.201:/home/cata/nmon



 5 查看效能命令

top      是Linux下常用的效能分析工具,能夠即時顯示系統中各個進程的資源佔用狀況

topas  是報告選定的本地Aix系統活動的統計資訊

nmon  執行nmon即時查看資源佔用狀況(需安裝)

ctrl+c  中斷程式的執行




 6 查看進程命令

ps -ef                      查看所有進程

ps -ef| grep nmon   查看包含nmon關鍵字的進程

ps -A | grep nmon   得到進程pid

kill -9 pid                 結束進程




相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.