Пинг в течение 60 секунд

Я хочу выполнить IP-адрес в течение 60 секунд. Как и в Windows, вы указываете время с флагом '-t'.

ping 192.168.1.1 -t60

Возможно ли это в Linux?

5
задан 20 November 2017 в 20:04

3 ответа

Из man ping

   -w deadline
          Specify  a  timeout, in seconds, before ping exits regardless of
          how many packets have been sent or received. In this  case  ping
          does  not  stop after count packet are sent, it waits either for
          deadline expire or until count probes are answered or  for  some
          error notification from network.

ex.

$ time ping -w60 192.168.1.65 &>/dev/null

real    1m0.001s
user    0m0.008s
sys     0m0.000s
16
ответ дан 22 May 2018 в 16:04

Из man ping

-w deadline Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are answered or for some error notification from network.

ex.

$ time ping -w60 192.168.1.65 &>/dev/null real 1m0.001s user 0m0.008s sys 0m0.000s
17
ответ дан 18 July 2018 в 02:56

Из man ping

-w deadline Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are answered or for some error notification from network.

ex.

$ time ping -w60 192.168.1.65 &>/dev/null real 1m0.001s user 0m0.008s sys 0m0.000s
17
ответ дан 24 July 2018 в 17:41

Другие вопросы по тегам:

Похожие вопросы: