February 26, 2004

html 信件

MIME-Version, Content-Type header 為 html 信件必備, 缺一 html 信無法正常顯示

cat $TEMP | formail -k -X From -X To -X Subject -X MIME-Version -X Content-Type -I "To: $EMAIL" -I "Subject:$SUBJECT" | sendmail -t

Posted by pank at 11:43 AM | Comments (0)

February 25, 2004

February 24, 2004

ftp daemon when anonymous login failed

Login failed.
No control connection for command: No such file or directory
當出現上述, 表示 /etc/passwd 裡 ftp 帳號的 home 目錄不存在

Posted by pank at 10:10 AM | Comments (0)

台語字典

http://203.64.42.21/iug/Ungian/soannteng/chil/Taihoa.asp

Posted by pank at 07:38 AM | Comments (0)

February 19, 2004

自解 script 範例

把以下存成 script 檔 test.sh, 把壓好的 file.tgz 附加在後面 cat file.tgz >> test.sh
exit 0 以上的地方可以再加任意指令

#!/bin/sh
tail +$((`grep -an "^### end of script" $0 | head -1 | cut -d: -f1`+1)) $0 | tar zxf -


exit 0
### end of script ### by pank

Posted by pank at 01:12 PM | Comments (0)

February 18, 2004

linux fdisk CHS 和 size 大小關係

調大 H, cylinders 變少, size 變小(小幅)
調大 S, cylinders 變少, size 變小(小幅)
所有要得到最大 size, fdisk 時, -H -S 都用最小

Posted by pank at 06:44 PM | Comments (0)