Sponsored Content
Full Discussion: Wget ouput to log file
Top Forums UNIX for Dummies Questions & Answers Wget ouput to log file Post 302908208 by rbatte1 on Friday 4th of July 2014 12:42:21 PM
Old 07-04-2014
Reading the manual page for wget it suggests that there are options for -o & -O

Quote:
-o logfile
Log all messages to logfile. The messages are normally reported to standard error.
- - or - -
Quote:
-O file
The documents will not be written to the appropriate files, but all will be concatenated together and written to file. If - is
used as file, documents will be printed to standard output, disabling link conversion. (Use ./- to print to a file literally
named -.)

Use of -O is not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to shell
redirection: wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated immediately, and
all downloaded content will be written there.

For this reason, -N (for timestamp-checking) is not supported in combination with -O: since file is always newly created, it will
always have a very new timestamp. A warning will be issued if this combination is used.

Similarly, using -r or -p with -O may not work as you expect: Wget won't just download the first file to file and then download
the rest to their normal names: all downloaded content will be placed in file. This was disabled in version 1.11, but has been
reinstated (with a warning) in 1.11.2, as there are some cases where this behavior can actually have some use.

Note that a combination with -k is only permitted when downloading a single document, as in that case it will just convert all
relative URIs to external ones; -k makes no sense for multiple URIs when they're all being downloaded to a single file.
Have you got the right one? Try lower case and give it a file-name to work with, something like:-
Code:
wget -o /tmp/my_log_file 'https://dynamicdns.park-your-domain.com/update?host=www&domain=example.com&password=your DDNS password'

Does that help?




Robin

Last edited by rbatte1; 07-04-2014 at 01:43 PM.. Reason: Changing "’" for an apostrophe
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using wget to download a file

Hello Everyone, I'm trying to use wget recursively to download a file. Only html files are being downloaded, instead of the target file. I'm trying this for the first time, here's what I've tried: wget -r -O jdk.bin... (4 Replies)
Discussion started by: thoughts
4 Replies

2. Shell Programming and Scripting

download a particular file using wget

Hi All I want to download srs8.3.0.1.standard.linux24_EM64T.tar.gz file from the following website : http://downloads.biowisdomsrs.com/srs83_dist/ But this website contains lots of zipped files I want to download the above file only discarding other zipped files. When I am trying the... (1 Reply)
Discussion started by: alphasahoo
1 Replies

3. UNIX and Linux Applications

download file using wget

I need to download the following srs8.3.0.1.standard.linux26_32.tar.gz file from the following website: http://downloads.biowisdomsrs.com/srs83_dist There are many gzip files along with the above one in the above site but I want to download the srs8.3.0.1.standard.linux26_32.tar.gz only from... (1 Reply)
Discussion started by: alphasahoo
1 Replies

4. Shell Programming and Scripting

Limit ouput file on a shell script

I have this one::) doing jstack on JVM proccess. #!/bin/ksh # ---------------------------------------------------- # capture_jstack.sh <INTERVAL> <COUNT> # run jstack and capture output to a log file #----------------------------------------------------- # # scripts and logs are stored... (3 Replies)
Discussion started by: pointer
3 Replies

5. Shell Programming and Scripting

View ouput as a file

Hi all , I have a view in teradata , the ouput of that view have to be stored as a file with delimitere as '|'.Is there any possibility of doing this in unix ? Thanks in advance , Vinoth (6 Replies)
Discussion started by: vino.paal
6 Replies

6. UNIX for Dummies Questions & Answers

wget redirect file name

I am downloading a file using wget and the following is embedded in a script: wget http://www.example.com/ABCDfilename123.txt -O filename123.txt Because the 123 is incremented with every day, I need to pass the file in a parametric manner, so the filename as given after capital D. How do I... (2 Replies)
Discussion started by: figaro
2 Replies

7. Shell Programming and Scripting

Call a Perl script within a bash script and store the ouput in a .txt file

I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients). I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Discussion started by: mecaka
6 Replies

8. Shell Programming and Scripting

Inserting ouput into a file using redirection

Hallo Team, I would like to redirect an output from a file into another file. Here are the two commands/files. -bash-3.2$ cat lack.csv lemontwistpax -bash-3.2$ ll -ltr BW*|tail -1 -rw-r--r-- 1 mind mind 1844 Sep 25 12:06... (8 Replies)
Discussion started by: kekanap
8 Replies

9. Shell Programming and Scripting

Wget rename file

Is it possible to use a cookie transfer to a location and then rename the output? cd target_directory wget -x --load-cookies cookies.txt http://172.24.188.113/data/getCSV.csv | for file in * do mv $file $file.txt done For example, if I change the directory to C:\test and use the ... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. Shell Programming and Scripting

Wget - working in browser but cannot download from wget

Hi, I need to download a zip file from my the below US govt link. https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP I only have wget utility installed on the server. When I use the below command, I am getting error 403... (2 Replies)
Discussion started by: Prasannag87
2 Replies
All times are GMT -4. The time now is 06:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy