LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ping -t option in linux ? (https://www.linuxquestions.org/questions/linux-newbie-8/ping-t-option-in-linux-796515/)

linux_sj 03-19-2010 10:33 AM

Ping -t option in linux ?
 
is there a ping -t option in linux as there is in dos ?

it would be helpful

GrapefruiTgirl 03-19-2010 10:35 AM

Hi, welcome to LQ!

According to the man page for `ping` there is both a -t and -T option.

try:
Code:

shell$ man ping
for the details.

Sasha

repo 03-19-2010 10:36 AM

What does ping -t do ?
Take a look at
Code:

man ping

colucix 03-19-2010 11:04 AM

Quote:

Originally Posted by linux_sj (Post 3904603)
is there a ping -t option in linux as there is in dos?

I'm afraid not. The *nix ping sends packets continuously, but does not print the statistic until you terminate (usually with Ctrl-C).

Anyway, using options you may control the number of packets to send or set a specific amount of time after which ping terminates without human intervention.

onebuck 03-19-2010 01:44 PM

Hi,

Welcome to LQ!

You should learn to use the 'man command' from the cli or online.

Just a few links to aid you to gaining some understanding;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Utimate Linux Newbie Guide
LinuxSelfHelp
Getting Started with Linux
Advanced Bash-Scripting Guide
Linux Home Networking

:hattip:
The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!

frieza 03-19-2010 02:15 PM

Quote:

Originally Posted by colucix (Post 3904631)
I'm afraid not. The *nix ping sends packets continuously, but does not print the statistic until you terminate (usually with Ctrl-C).

Anyway, using options you may control the number of packets to send or set a specific amount of time after which ping terminates without human intervention.

not entirely true

Ctrl+| (ctrl + pipe symbol) will show an abreviated version of the summary
Quote:

Originally Posted by http://www.thegeekstuff.com/2009/11/ping-tutorial-13-effective-ping-command-examples/
Ping Example 13. Shorter statistics with SIGQUIT

While ping is printing the individual packet status, when you want to view the shorter statistics you can use this technique.

Pressing CTRL+| (Control key followed by pipe symbol) for the shows the summary in between, and continues with it packet sending and receiving process.
$ ping -w 100 localhost
Code:

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=10 ttl=64 time=0.021 ms
64 bytes from localhost (127.0.0.1): icmp_seq=11 ttl=64 time=0.022 ms
11/11 packets, 0% loss, min/avg/ewma/max = 0.020/0.022/0.022/0.024 ms
64 bytes from localhost (127.0.0.1): icmp_seq=12 ttl=64 time=0.021 ms
64 bytes from localhost (127.0.0.1): icmp_seq=13 ttl=64 time=0.022 ms
64 bytes from localhost (127.0.0.1): icmp_seq=14 ttl=64 time=0.021 ms
64 bytes from localhost (127.0.0.1): icmp_seq=15 ttl=64 time=0.021 ms
19/19 packets, 0% loss, min/avg/ewma/max = 0.020/0.022/0.022/0.024 ms
64 bytes from localhost (127.0.0.1): icmp_seq=31 ttl=64 time=0.022 ms
64 bytes from localhost (127.0.0.1): icmp_seq=32 ttl=64 time=0.022 ms
32/32 packets, 0% loss, min/avg/ewma/max = 0.020/0.022/0.022/0.027 ms
64 bytes from localhost (127.0.0.1): icmp_seq=33 ttl=64 time=0.023 ms


the full article can be found here:
http://www.thegeekstuff.com/2009/11/...mand-examples/

colucix 03-19-2010 02:52 PM

Quote:

Originally Posted by frieza (Post 3904834)
Ctrl+| (ctrl + pipe symbol) will show an abreviated version of the summary

Thank you, frieza! I didn't know about that. Something new to learn every day :)

worm5252 03-19-2010 05:11 PM

pint -t in Dos just does a ping until you send a break command. Linux does this without any options. so In Linux there is no need for -t or any other option to get the same effect.

jschiwal 03-19-2010 06:19 PM

Your system may alias ping to limit the number of pings.
e.g. alias ping='ping -c4'

omersattar 03-19-2010 11:20 PM

If you want continues ping .then in linux simply "ping 192.168.1.1" is enough .No need for any option

frieza 03-20-2010 02:41 PM

again not entirely true, although the default options are usually adaquate there are circumstances where they are not (although i admit i can't think of any off hand)
as for ping -t on windows linux you would have to do the OPPOSITE, that is specifiy a set number of pings before it stops
which would be
Code:

ping -c *number of pings to send*
especially useful if operating in a circumstance where sending a sigkill may be difficult


All times are GMT -5. The time now is 12:10 AM.