Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

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

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