怎麼用bash command記錄ftp斷線log - Linux

Table of Contents

我用ftp command的方法upload及download檔案
考慮網絡不穩的情形 想要把連不上ftp或斷線的情形寫成log
這樣我下次執行時 只要看log檔就好

當我連上某一臺ftp server且下載檔案時
我強制從server把client踢掉
雖然我的client斷線了
可是command window卻沒有任何訊息
這樣我要怎麼把斷線的訊息寫到我的log呢?

謝謝了

--

All Comments

Heather avatarHeather2012-04-20
用 Ruby or Python 之類的代替 Bash
寫這種腳本很快,不用折磨自己
Una avatarUna2012-04-20
https://gist.github.com/2410405 寫一個腳本分享給你.
Olga avatarOlga2012-04-24
這不是應該從 syslog 或是 ftp 著手嗎 XD