Displaying keyword search results 1 - 2
Created by magnum on May 06, 2011 12:26:14 Last update: May 06, 2011 12:26:14
The bash environment variable PROMPT_COMMAND contains a regular bash command that is executed just before the command prompt is displayed. For example:
$ export PROMPT_COMMAND=a bash: a: command not ...The command a is not valid so you get the error message every time you hit enter. Echo something before $PS1 :
$ export PROMPT_COMMAND='echo -n Hi!' Hi!$ ...PROMPT_COMMAND is regularly used to change the xterm window title. You may find this in /etc/bashrc :
case $TERM in xterm*) if [ -...
Created by Dr. Xi on February 11, 2010 05:07:48 Last update: February 11, 2010 05:08:20
On Linux, you can use the fuser command to find out who has a file open, or is using a port. For example, if you start Tomcat and get the error "Address already in use: 8080", you want to know which process is already binding to port 8080.
# list processes on port 8080 fuser 8080/tcp ...