display full unix path as part of the command line | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

display full unix path as part of the command line

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-10-2006
ocelot ocelot is offline
Registered User
 
Join Date: Sep 2006
Last Activity: 8 January 2009, 12:27 PM EST
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
display full unix path as part of the command line

Hi all,

Does anyone know how to ammend the .cshrc file in $HOME for your session to display the path as part of the command line? So that I dont need to keep on typing pwd to see where I am?

thanks

Ocelot
Sponsored Links
    #2  
Old 10-10-2006
ranj@chn ranj@chn is offline Forum Advisor  
Registered User
 
Join Date: Oct 2005
Last Activity: 25 August 2011, 2:35 AM EDT
Location: Chennai
Posts: 370
Thanks: 0
Thanked 5 Times in 4 Posts
Search forums

Search for PS1 in the forums. Here is one
Sponsored Links
    #3  
Old 10-10-2006
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
 
Join Date: Mar 2005
Last Activity: 5 July 2014, 11:14 AM EDT
Location: classification algos
Posts: 3,203
Thanks: 19
Thanked 30 Times in 27 Posts
Moderators,

duplicate post
    #4  
Old 10-10-2006
reborg's Avatar
reborg reborg is offline Forum Advisor  
Administrator Emeritus
 
Join Date: Mar 2005
Last Activity: 29 March 2012, 7:00 PM EDT
Location: Ireland
Posts: 4,464
Thanks: 0
Thanked 11 Times in 11 Posts
csh does not dealt with prompts in the same way as a bourne based shell.

There are two way to set this in a csh/tcsh shell.


in csh you would have to do something like this in your .cshrc

Code:
alias precommand 'set prompt="${cwd} >"'
precommand           # to set the initial prompt
alias cd 'chdir \!* && precommand'

gives:
/var/tmp/templog >



In tcsh you would add %/ to the prompt options for example:

Code:
set prompt="%m{%n} %/ >"

would give:

myhost{reborg} /var/tmp/templog >
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Display full command (including options) information in running happy_lotus UNIX for Dummies Questions & Answers 3 04-18-2012 04:05 AM
how to fetch part of a line and display rampriya.s UNIX for Advanced & Expert Users 4 11-17-2011 02:59 AM
How to extract strings from full path when full path is not fixed Shirisha Shell Programming and Scripting 0 10-07-2010 04:08 AM
ls command to give full path to files brendan76 Red Hat 1 05-16-2009 03:12 PM
full path of .profile in unix dba UNIX for Dummies Questions & Answers 6 02-22-2008 05:12 AM



All times are GMT -4. The time now is 04:30 PM.