Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to use wget to save the text of a web page. I run:

wget "http://www.finance.yahoo.com/q/op?s=GOOG" > goog.txt 

to try and save the web page to goog.txt, but instead wget tells me:

Saving to: `op?s=GOOG'

Why is wget acting like this, and how can I get the expected behavior?

share|improve this question
add comment

migrated from stackoverflow.com Apr 30 '11 at 5:46

This question came from our site for professional and enthusiast programmers.

1 Answer

Use the -O option:

wget "http://www.finance.yahoo.com/q/op?s=GOOG" -O goog.txt 
share|improve this answer
And to answer the first part of the question (why): wget prints tracing information to standard output and downloads the content to a file whose name is derived from the URL and server response. Also, use -q to suppress tracing information. –  Gilles Apr 30 '11 at 12:12
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.