LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Present working directory path display help RHEL5* (https://www.linuxquestions.org/questions/linux-newbie-8/present-working-directory-path-display-help-rhel5%2A-887871/)

aggrishabh 06-23-2011 01:26 AM

Present working directory path display help RHEL5*
 
Hi All,

need to know, how we can display the whole (till current directory) path in below highlighted way. normally it shows only the name of current working directory after the server name.

(1) /abc/xyz/
[lion@test] $

siranjeevi 06-23-2011 04:45 AM

Hi,

I dont think you can have that option. You can use the command
Quote:

pwd
this will display the full directory path.

ssrameez 06-23-2011 04:51 AM

If you are looking for the display along with the shell prompt, you need to add a variable called PS1 in the .profile or .bash_profile file of the user.

have a look at "http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/"

colucix 06-23-2011 05:17 AM

In the PS1 variable, substitute \W with \w (lowercase w) and it will display the full path of the current directory.


All times are GMT -5. The time now is 10:44 AM.