How to get the current directory Path? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Unix/Linux 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 !!

How to get the current directory Path?

UNIX for Dummies Questions & Answers


Closed Linux or Unix Question    
 
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  
Moderator
 
Join Date: Jul 2012
Last Activity: 4 March 2015, 9:36 PM EST
Location: San Jose, CA, USA
Posts: 5,767
Thanks: 235
Thanked 1,915 Times in 1,632 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: 4 March 2015, 5:50 AM EST
Posts: 45
Thanks: 1
Thanked 2 Times in 2 Posts
just type 'pwd' without any quotes.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image 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 12:05 AM.