LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2010, 10:33 AM   #1
linux_sj
Member
 
Registered: Mar 2010
Posts: 30

Rep: Reputation: 0
Ping -t option in linux ?


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

it would be helpful
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-19-2010, 10:35 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
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
 
Old 03-19-2010, 10:36 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What does ping -t do ?
Take a look at
Code:
man ping
 
Old 03-19-2010, 11:04 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by linux_sj View Post
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.
 
Old 03-19-2010, 01:44 PM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
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


The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
0 members found this post helpful.
Old 03-19-2010, 02:15 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by colucix View Post
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/

Last edited by frieza; 03-19-2010 at 02:20 PM.
 
2 members found this post helpful.
Old 03-19-2010, 02:52 PM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by frieza View Post
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
 
Old 03-19-2010, 05:11 PM   #8
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
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.
 
Old 03-19-2010, 06:19 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Your system may alias ping to limit the number of pings.
e.g. alias ping='ping -c4'
 
Old 03-19-2010, 11:20 PM   #10
omersattar
LQ Newbie
 
Registered: Feb 2008
Posts: 14

Rep: Reputation: 1
If you want continues ping .then in linux simply "ping 192.168.1.1" is enough .No need for any option
 
Old 03-20-2010, 02:41 PM   #11
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
ping hangs when specifying the interface option j-osh Linux - Networking 3 02-11-2009 02:55 PM
rpm have --nodeps option with dpkg is such an option available deepclutch Debian 2 03-26-2006 09:49 PM
LInux can ping other PC but others cannot Ping Linux Box wayldfayr Linux - Networking 8 10-17-2005 12:20 PM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration