Logowww.asingh.netHomeNewsBioInterestsTechnicalSearchContact



 Archive :

  May 2006
  June 2006
  July 2006
  July 2007
  August 2007
  April 2008
  June 2008
  December 2008
  January 2009
  March 2009
  June 2009
  January 2010
 

How To Set Meaningful UNIX Command Prompt?

If you use C-shell, following may be used to set meaningful unix command prompt. For example, to display current working directory in the prompt, add the following lines in the .cshrc file (and then issues "source .cshrc" command).


set HOSTNAME=`uname -n`
set prompt="${HOSTNAME}:`pwd` \! % "
alias cd 'cd \!*;set prompt="${HOSTNAME}:`pwd` \! % "'
alias pushd 'pushd \!*;set prompt="${HOSTNAME}:`pwd` \! % "'
alias popd 'popd \!*;set prompt="${HOSTNAME}:`pwd` \! % "'

posted by Amandeep 6/10/2006 11:57:00 PM | PERMALINK

 

 

| Home | News | Bio | Interests | Technical | Search | Contact |

This page is powered

by Blogger.