[SOLVED]Why does "ping" stop?

D

Deleted member 127267

Guest
I am new to Linux. I have read that the terminal command "ping" repeats continouosly unless you specify "-c"(count) option. I add "-i" option to command to give an interval between successive pings. However, below code stops after two pings :

ping -i 500 x.x.x.x >> somefile

Why?
 
Last edited by a moderator:


jpnilson

Active Member
Joined
Jul 31, 2021
Messages
123
Reaction score
67
Credits
1,087
That should work. I didn't test at the once every 8 minute interval you are using but still should work. Have you tried with a much shorter interval? What os are you using?
 
OP
D

Deleted member 127267

Guest
Hi jpnilson, it worked ! Fault was due to my internet connection, it breaks for short durations. While I reconnect a cable, it worked. Thanks. :)
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top