-1

When using --timeout with wget, I was expecting that if the transaction hasn't completed within the timeout period, then it would abort.

However, it seems to mean (with respect to read-timeout) that no data should have transferred in 30 seconds for the timeout to trigger (or dns or connecting takes longer than 30 seconds).

Is there a one-liner way to abort a wget if it takes too long?

update: This is on a Centos 5.6 box running coreutils 5.97

Paul
  • 1,288
  • 13
  • 25

1 Answers1

0

The EL5 series Centos versions do not include the version of coreutils containing the "timeout" command traditionally used for ending a process after a specific time.

However, there is a script included that does the same thing, located at

/usr/share/doc/bash-3.2/scripts/timeout

This should ideally be copied to an appropriate bin folder (/usr/local/bin for example) and chmoded executable.

Paul
  • 1,288
  • 13
  • 25