Re: gathering trace rute output to a file?
On Sun, 1 Jul 2018, Ben Caradoc-Davies wrote:
On 01/07/18 15:45, Karen Lewellen wrote:
Hi folks,
when running tracerute, is there an option that exports the results to a
file that can be shared?
Thanks,
Karen
Can you use shell redirection? In bash:
traceroute host &>logfile
In other Bourne shells:
traceroute host >logfile 2>&1
These commands redirect both standard output and standard error to
logfile. It is also possible to redirect them separately. See a
shell guide for details.
There are some bad guides out there, last I looked.
If you are using the bash shell, here are some I can recommend.
From the horse's mouth:
Bash Reference Manual
http://www.gnu.org/software/bash/manual/bashref.html
The part specifically about redirection:
http://www.gnu.org/software/bash/manual/bashref.html#Redirections
Also recommended (somewhat more discursive, maybe friendlier):
BashGuide - Greg's Wiki
http://mywiki.wooledge.org/BashGuide
On redirection:
BashGuide/InputAndOutput - Greg's Wiki
http://mywiki.wooledge.org/BashGuide/InputAndOutput
http://mywiki.wooledge.org/BashGuide/InputAndOutput#Redirection
Reply to: