Which is the easiest way to get the last TTL with traceroute? The last line with IP or Host....

link|improve this question
feedback

3 Answers

up vote 3 down vote accepted

You can try

traceroute google.com | tail -n 1 | awk '{ print $1 }'

which just prints the number at the beginning of the last line which all things being equal should be the last TTL.

link|improve this answer
feedback

The last host of a traceroute should be the destination. Any normal ping should give you that.

Alternatively, just look at the line number.

link|improve this answer
feedback
$ traceroute google.com | awk 'END { print $1 }'
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.