[email protected]> [FROM: 218-170-49-2.HI]
> -------------------------------------------------------------------------- <
發信人: jimin <[email protected]>, 看板: FreeBSD
標 題: Re: uvscan病毒碼更新請教
發信站: DCI HiNet (Mon Aug 11 03:30:08 2003)
轉信站: ptt!ctu-reader!ctu-peer!news.nctu!news.netfront.net!newsgate.cuhk.edu.
我想你在 shell script 中
最好是把 path 也寫進去
例如:wget 寫成 /usr/ports/ftp/wget
這樣子比較不會有問題
我常常也有這種狀況
不曉得誰有更好的解決方法 :)
On 10 Aug 2003 18:17:29 GMT
[email protected] (yufun) wrote:
> #!/bin/bash
> datdir="ftp://ftp.mcafee.com/pub/datfiles/english/"
>
> cd /usr/local/libexec/uvscan/
> rm -f .listing* index.htm*
>
> wget -q -O latest-dat.tar $datdir/`wget -qnr $datdir &&
> grep tar .listing | awk {'print $4'}`
>
> tar -xf latest-dat.tar
>
>
>
> 執行的時候出現
> #./uv-update.sh
> /uv-update.sh: Command not found.
>
> 請教是哪裡錯了呢?謝謝!
> --
> Ξ Origin: 中興大學天樞資訊網 <[email protected]> [FROM: 218-170-49-2.HI]
> -------------------------------------------------------------------------- <
發信人: [email protected] (Yen-Ming Lee), 看板: FreeBSD
標 題: Re: uvscan病毒碼更新請教
發信站: 臥龍居 (Mon Aug 11 07:29:44 2003)
轉信站: ptt!ctu-reader!ctu-peer!news.nctu!freebsd.ntu!utopia.leeym.com!LeeymBB
※ 引述《[email protected]》之銘言:
: #!/bin/bash
: datdir="ftp://ftp.mcafee.com/pub/datfiles/english/"
: cd /usr/local/libexec/uvscan/
: rm -f .listing* index.htm*
: wget -q -O latest-dat.tar $datdir/`wget -qnr $datdir &&
: grep tar .listing | awk {'print $4'}`
: tar -xf latest-dat.tar
: 執行的時候出現
: #./uv-update.sh
: /uv-update.sh: Command not found.
: 請教是哪裡錯了呢?謝謝!
裝 bash, 或者把第一行的 /bin/bash 換成 /bin/sh
> -------------------------------------------------------------------------- <
發信人: jimin <[email protected]>, 看板: FreeBSD
標 題: Re: uvscan病毒碼更新請教
發信站: DCI HiNet (Mon Aug 11 08:39:23 2003)
轉信站: ptt!ctu-reader!ctu-peer!Spring!news.nctu!netnews.eranet.net!news.ttn.n
看來的....
其實並不用去寫 script,當你裝好 uvscan 時,就會產生一個 update_dat 的檔
只要將其加入 crontab 的排程裡,即可每天自動 UPDATE 病毒碼
update_dat 的路徑為 /usr/local/sbin/update_dat
On 10 Aug 2003 18:17:29 GMT
[email protected] (yufun) wrote:
> #!/bin/bash
> datdir="ftp://ftp.mcafee.com/pub/datfiles/english/"
>
> cd /usr/local/libexec/uvscan/
> rm -f .listing* index.htm*
>
> wget -q -O latest-dat.tar $datdir/`wget -qnr $datdir &&
> grep tar .listing | awk {'print $4'}`
>
> tar -xf latest-dat.tar
>
>
>
> 執行的時候出現
> #./uv-update.sh
> /uv-update.sh: Command not found.
>
> 請教是哪裡錯了呢?謝謝!
> --
> Ξ Origin: 中興大學天樞資訊網 <[email protected]> [FROM: 218-170-49-2.HI]
> -------------------------------------------------------------------------- <
發信人: [email protected] (E.L.), 看板: FreeBSD
標 題: Re: uvscan病毒碼更新請教
發信站: 台大電機 Maxwell BBS (Mon Aug 11 15:31:33 2003)
轉信站: ptt!ctu-reader!ctu-peer!news.nctu!netnews.csie.nctu!freebsd.ntu!bbs.ee
※ 引述《[email protected] (Yen-Ming Lee)》之銘言:
: ※ 引述《[email protected]》之銘言:
: : #!/bin/bash
: : datdir="ftp://ftp.mcafee.com/pub/datfiles/english/"
: : cd /usr/local/libexec/uvscan/
: : rm -f .listing* index.htm*
: : wget -q -O latest-dat.tar $datdir/`wget -qnr $datdir &&
: : grep tar .listing | awk {'print $4'}`
: : tar -xf latest-dat.tar
: : 執行的時候出現
: : #./uv-update.sh
: : /uv-update.sh: Command not found.
: : 請教是哪裡錯了呢?謝謝!
: 裝 bash, 或者把第一行的 /bin/bash 換成 /bin/sh
ports 裡面的uvscan-dat有附一個shell script
ericlin@ericlin [3:30pm] ~> which update_dat
/usr/local/sbin/update_dat
#!/bin/bash
datdir="ftp://ftp.mcafee.com/pub/datfiles/english/"
cd /usr/local/libexec/uvscan/
rm -f .listing* index.htm*
wget -q -O latest-dat.tar $datdir/`wget -qnr $datdir &&
grep tar .listing | awk {'print $4'}`
tar -xf latest-dat.tar
執行的時候出現
#./uv-update.sh
/uv-update.sh: Command not found.
請教是哪裡錯了呢?謝謝!
--
Ξ Origin: 中興大學天樞資訊網 <