Since this seems to be such a FAQ, here's a script that lets you search the known-port list by a port number or string. E.g., $ ./port 666 mdqs 666/tcp mdqs 666/udp doom 666/tcp doom Id Software doom 666/udp doom Id Software $ ./port -s imap imap 143/tcp Internet Message Access Protocol : imaps 993/udp imap4 protocol over TLS/SSL Save the following to file, chmod +x it, and change the known_ports variable to whatever's appropriate. Then run ./port -u to create the known-ports file with all of the cruft removed. Enjoy. ------------------------ port ------------------------------------- #!/usr/bin/bash # ckm # searches the known-port list for either a port number or # a string. The 'u' option updates $known_ports from # http://www.isi.edu/in-notes/iana/assignments/port-numbers # todo: make the grep more flexible (pass it a regex, additional options) # add an fuser option to show what processes are using the specified port # change this known_ports=$HOME/doc/port-numbers update_url="http://www.isi.edu/in-notes/iana/assignments/port-numbers" usage="Usage: port [-s|-u] string | port number" if [ "$#" = 0 ]; then echo $usage exit 1 fi while getopts "hsu" opt; do case $opt in s ) have_string=true ;; u ) lynx -source $update_url | egrep -i '^.*[0-9]\/' >| $known_ports exit "$?" ;; * ) echo "$usage" exit 1 ;; esac done if [ ! -f "$known_ports" ]; then echo "Create $known_ports with ./port -u first" exit 1 fi shift $(($OPTIND -1)) if [ ! "$have_string" = true ]; then cat $known_ports | grep "\b$1/" exit_status="$?" else string="$@" cat $known_ports | grep -Fi $string exit_status="$?" fi exit "$exit_status"