簡體   English   中英

沒有日志文件的WGET

[英]WGET without the log file

每次我使用wget http://www.domain.com時 ,我的服務器上都會自動保存一個日志文件。 無論如何在沒有記錄的情況下運行此命令?

謝謝,

喬爾

你可以嘗試-o和-q

-o logfile
   --output-file=logfile
       Log all messages to logfile.  The messages are  
       normally reported to standard error.
-q
 --quiet
     Turn off Wget's output.

所以你有:

wget ... -q -o /dev/null ...

這會將網站內容打印到標准輸出,當您說您不想記錄到文件時,這是什么意思?

wget -O - http://www.domain.com/

我個人發現@Paul的答案仍在添加到日志文件中,無論-q的命令行輸出如何

-o輸出文件參數的/dev/null ontop上添加了-O

wget [url] -q -o /dev/null -O &> /dev/null

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM