tracepath
来自「linux下traceroute的实现」· 代码 · 共 62 行
TXT
62 行
#!/bin/sh## Copyright (c) 2008 Dmitry Butskoy# <buc@citadel.stu.neva.ru># License: GPL v2 or any later## See COPYING for the status of this software.### Shell wrapper providing tracepath(1) or tracepath6(1) command line interface.## The original implementation of tracepath/tracepath6 can be obtained# from the iputils package, available at http://www.skbuff.net/iputils/#opts="-q1 --mtu --back"port=44444prgname=$0usage () { echo "Usage: $prgname [-nbh] host[/port]" >&2}PARSED=`getopt 'hnb' "$@"`[ $? != 0 ] && exit 2eval set -- "$PARSED"while [ $# -gt 0 ]do case "$1" in -n) opts="$opts $1"; shift ;; -b) shift ;; -h) usage ; exit 0 ;; --) shift; break ;; *) echo "$prgname: Internal parsing error" >&2; exit 2 ;; esacdone[ $# -eq 0 ] && { usage exit 2}host=$1case "$host" in */*) port=${host##*/} host=${host%/*} ;;esaccase "$prgname" in *6) opts="$opts -6" ;;esacexec traceroute $opts -p $port $host
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?