Check These Out
I usually have 5 or more ssh connections to various servers, and putting this command in my .bash_profile file makes my putty window or x terminal window title change to this easily recognizable and descriptive text. Includes the username, group, server hostname, where I am connecting from (for SSH tunneling), which device pts, current server load, and how many processes are running.
You can also use this for your PROMPT_COMMAND variable, which updates the window title to the current values each time you exec a command.
I prefix running this in my .bash_profile with
$ [[ ! -z "$SSH_TTY" ]] &&
which makes sure it only does this when connecting via SSH with a TTY.
Here's some rougher examples from http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html
$ # If set, the value is executed as a command prior to issuing each primary prompt.
$ #H=$((hostname || uname -n) 2>/dev/null | sed 1q);W=$(whoami)
$ #export PROMPT_COMMAND='echo -ne "\033]0;${W}@${H}:${PWD/#$HOME/~} ${SSH_TTY/\/dev\//} [`uptime|sed -e "s/.*: \([^,]*\).*/\1/" -e "s/ //g"`]\007"'
$ #PROMPT_COMMAND='echo -ne "\033]0;`id -un`:`id -gn`@`hostname||uname -n 2>/dev/null|sed 1q` `command who -m|sed -e "s%^.* \(pts/[0-9]*\).*(\(.*\))%[\1] (\2)%g"` [`uptime|sed -e "s/.*: \([^,]*\).*/\1/" -e "s/ //g"` / `command ps aux|wc -l`]\007"'
$ #[[ -z "$SSH_TTY" ]] || export PROMPT_COMMAND
$ #[[ -z "$SSH_TTY" ]] && [[ -f /dev/stdout ]] && SSH_TTY=/dev/stdout
And here's a simple function example for setting the title:
$ function set_window_title(){ echo -e "\033]0; ${1:-$USER@$HOST - $SHLVL} \007"; }
host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given, host prints a short summary of its command line arguments and options.
This shell function displays a list of binaries contained in an installed package; works on Debian based Linux distributions.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Looks best in an 80x24 256-color terminal emulator.
From:
http://www.debian-administration.org/users/fsateler/weblog/4
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Creates files in $DATE and hardlinks existing files to $PREVDATE. Thus full backup in each directory. Only drawback is changed modification time. Recommend a wrapper script to determine $DATE and $PREVDATE. Works like a charm. (Dirvish handrolled)