-設定資源: ulimit
                      -a: 列出目前哪些資源受到限制
-設定不限制core file size: ulimit -c unlimited

-印出環境變數: printenv

-設定環境變數: export TEST=/tmp

-搜尋某隻應用程式: ps aux | grep [application]

- 找出目前目錄下所有包含test字樣但沒有Binary字樣的檔案內容grep "test" * | grep -v "Binary"

- 更新目前目錄下所有檔案的time stamp: ls -R | xargs touch

- IP正反查: nslookup [IP or Hostname]

- 看routing table: route -n

- 用rpm -q kernel-nctuns查詢安裝過的nctuns kernel

- 用rpm -e [kernel-nctuns-name]移除kernel

- rename [from] [to] [from*]

- 從/資料夾開始找httpd.conf的檔案: find / -name httpd.conf -print

- converts plain text files in DOS/MAC format to Unix format: dos2unix

- convert encoding of given files from one encoding to another: iconv

- check file type: file

- 關閉iptable: service iptables stop

- iwlist eth1 scan

- watch cpu (linux)
cat /proc/cpuinfo

- vmstat
vmstat period totaltime > filename
e.g., vmstat 1 600 > filename
note: It will show the usage of resource every 1 second after 600 second then stop
and indirect the result to filename

- gawk
gawk -help
e.g., gawk '{ sum+= $13; cnt += 1 }; END { print sum; print cnt; print sum/cnt}' filename

無線網卡設定
  - iwconfig 看哪張卡是無線網卡 (假設eth1是無線網卡)
  - iwconfig eth1 essid "AP提供的ESSID"
  - 配置動態IP: dhclient eth1

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 vincentHsu 的頭像
    vincentHsu

    All By Myself

    vincentHsu 發表在 痞客邦 留言(0) 人氣()