2013年11月27日 星期三

du 計算檔案、資料夾大小

查詢掛載點下前 5 名佔用最多空間的資料夾 (單位為 KB)
#du -s /var/* | sort -rn | head -5

參考來源:http://www.weithenn.org/cgi-bin/wiki.pl?du-%E8%A8%88%E7%AE%97%E6%AA%94%E6%A1%88%E3%80%81%E8%B3%87%E6%96%99%E5%A4%BE%E5%A4%A7%E5%B0%8F

2013年10月17日 星期四

Windows 8.1 更新需要的是 KB2871389

微軟官網寫錯了!(有圖有真相)

Windows 8 免費升級到 Windows 8.1 更新需要的是 KB2871389

不是 KB2871839 害我找半天!


2013年10月7日 星期一

LINUX、AIX sh while script

LINUX
# watch -d -n 1 ‘netstat –ant'
-n 表示每一秒更新一次輸出。
-d 表示將有變更的部份以高亮標示(Highlight)

AIX
root@aix # vi watch.sh 

#!/bin/ksh
# $1 = 監控的間隔時間,以秒為單位.
# $2 = 請將所有要輸入的指令以雙引號(")或單引號(')包起來.
# Exit the watch.sh use Ctrl + C 
#

while true
do
  clear
  echo "Interval $1 sec, Command: $2"
  eval $2
  sleep $1
done

root@aix # chome +x watch.sh

#以下比方說要執行監控,每秒更新一次.
root@aix # ls -l /home/user | grep .profile
root@aix # ./watch.sh 1 "ls -l /home/user | egrep '.profile'"

參考來源:
http://xxooxp.blogspot.tw/2011/09/aixlinux-watch.html