Unix/Linux Go Back    


UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

How to get the current directory Path?

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-28-2013
Abhishek0683 Abhishek0683 is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 28 June 2013, 7:41 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Wrench How to get the current directory Path?

How to get the current directory Path in your prompt?

i am getting a $ mark only in my prompt?

Please help me with this
Sponsored Links
    #2  
Old Unix and Linux 06-28-2013
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 8 December 2016, 12:42 PM EST
Location: San Jose, CA, USA
Posts: 9,730
Thanks: 459
Thanked 3,321 Times in 2,841 Posts
Assuming that you're using a shell that recognizes basic Bourne shell syntax, try:

Code:
PS1='$PWD: '

Sponsored Links
    #3  
Old Unix and Linux 06-28-2013
Abhishek0683 Abhishek0683 is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 28 June 2013, 7:41 PM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks A Lot
    #4  
Old Unix and Linux 06-30-2013
vinil vinil is offline
Registered User
 
Join Date: Dec 2012
Last Activity: 8 December 2016, 10:42 AM EST
Posts: 49
Thanks: 1
Thanked 2 Times in 2 Posts
just type 'pwd' without any quotes.
Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to list all the files, directories and sub-directories in the current path except one directory? Manjunath B Shell Programming and Scripting 7 09-13-2012 11:00 AM
Setting the current directory path to terminal title kristinu UNIX for Dummies Questions & Answers 2 04-08-2012 04:36 PM
"find . -printf" without prepended "." path? Getting path to current working directory? pstein Shell Programming and Scripting 1 10-02-2011 09:23 AM
want the current directory without the absolute path olimiles Shell Programming and Scripting 2 09-01-2006 08:07 AM
Question about Restricting Search path of FIND to current directory super_duper_guy UNIX for Dummies Questions & Answers 2 10-17-2005 10:10 AM



All times are GMT -4. The time now is 07:59 PM.