1

I have a php script that generates bash commands to wget files. I am trying to log wget activity using this:

--directory-prefix='xxx' --append-output='xxx.txt' -c -t0 -S"

But the log is too big due to this:

 0K .......... .......... .......... .......... ..........  0%  110K 14m5s
50K .......... .......... .......... .......... ..........  0%  230K 10m24s
100K .......... .......... .......... .......... ..........  0%  272K 8m49s
150K .......... .......... .......... .......... ..........  0% 41.7K 15m53s
200K .......... .......... .......... .......... ..........  0%  173M 12m42s
.
.
.
92800K .......... .......... .......... .......... .......... 99%  156K 0s
92850K .......... .......... ...                             100%  139K=7m56s

Can I remove the output above and let wget to only get this:

Warning: wildcards not supported in HTTP.
--2015-03-14 20:10:22--  xxxx
Resolving xxxx... xxxx
Connecting to xxxx|xxxx|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 401 Unauthorized
  Server: nginx/1.4.4
  Date: Sat, 14 Mar 2015 12:09:58 GMT
  Content-Type: text/html
  Content-Length: 194
  Connection: keep-alive
  WWW-Authenticate: Basic realm="xxxx"
Reusing existing connection to xxxx:80.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Server: nginx/1.4.4
  Date: Sat, 14 Mar 2015 12:09:58 GMT
  Content-Type: application/octet-stream
  Content-Length: 95102657
  Last-Modified: Sun, 02 Mar 2014 04:54:04 GMT
  Connection: keep-alive
  ETag: "5312b96c-5ab26c1"
  Accept-Ranges: bytes
Length: 95102657 (91M) [application/octet-stream]
Saving to: `xxxx.mkv'
Warning: wildcards not supported in HTTP.
--2015-03-14 20:10:22--  xxxx
Resolving xxxx... xxxx
Connecting to xxxx|xxxx|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 401 Unauthorized
  Server: nginx/1.4.4
  Date: Sat, 14 Mar 2015 12:09:58 GMT
  Content-Type: text/html
  Content-Length: 194
  Connection: keep-alive
  WWW-Authenticate: Basic realm="xxxx"
Reusing existing connection to xxxx:80.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Server: nginx/1.4.4
  Date: Sat, 14 Mar 2015 12:09:58 GMT
  Content-Type: application/octet-stream
  Content-Length: 95102657
  Last-Modified: Sun, 02 Mar 2014 04:54:04 GMT
  Connection: keep-alive
  ETag: "5312b96c-5ab26c1"
  Accept-Ranges: bytes
Length: 95102657 (91M) [application/octet-stream]
Saving to: `xxxx.mkv'

2015-03-14 20:18:19 (195 KB/s) - `xxxx.mkv' saved [95102657/95102657]

I am consuming too much space just because of this log if I'm only interested with the real details.

1 Answer 1

1

You can turn off a lot of output with the -nv option. If that's too little verbosity for you, you can tune the progress report with the --progress option, but I think you can't remove it altogether. The dot:mega report style produces one dot per 64kB (instead of the default with a dot per 1kB).

wget --progress=dot:mega …

Recent versions also support dot:giga (a dot per 1MB).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.