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

Efficient Way To Fork sub-Processes

Using a fork() system call, followed by an exec() system call is the common way to spawn a sub-process from an application. The fork() call makes a copy of the entire parent process' address space, thus requiring two times the memory used by the parent process.

Solaris 10, provides the posix_spawn(3C) API for an application with large memory requirements to create a subprocess without running out of memory or creating a deadlock. Read more here.

posted by Amandeep 6/02/2006 09:22:00 PM | PERMALINK

 

 

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

This page is powered

by Blogger.