LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 11:33 AM   #1
linux_sj
LQ Newbie
 
Registered: Mar 2010
Posts: 26

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, 11:35 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
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, 11:36 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

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

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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, 02:44 PM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
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, 03: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,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
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 03:20 PM.
 
2 members found this post helpful.
Old 03-19-2010, 03:52 PM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

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

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Your system may alias ping to limit the number of pings.
e.g. alias ping='ping -c4'
 
Old 03-20-2010, 12:20 AM   #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, 03: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,200

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:39 PM
ping hangs when specifying the interface option j-osh Linux - Networking 3 02-11-2009 03:55 PM
rpm have --nodeps option with dpkg is such an option available deepclutch Debian 2 03-26-2006 10:49 PM
LInux can ping other PC but others cannot Ping Linux Box wayldfayr Linux - Networking 8 10-17-2005 01: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 05:57 AM


All times are GMT -5. The time now is 04:58 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration