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: 24 May 2015, 4:36 AM EDT
Location: San Jose, CA, USA
Posts: 6,363
Thanks: 266
Thanked 2,128 Times in 1,819 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: 16 March 2015, 5:50 AM EDT
Posts: 46
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

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 10:00 AM
Setting the current directory path to terminal title kristinu UNIX for Dummies Questions & Answers 2 04-08-2012 03:36 PM
"find . -printf" without prepended "." path? Getting path to current working directory? pstein Shell Programming and Scripting 1 10-02-2011 08:23 AM
want the current directory without the absolute path olimiles Shell Programming and Scripting 2 09-01-2006 07:07 AM
Question about Restricting Search path of FIND to current directory super_duper_guy UNIX for Dummies Questions & Answers 2 10-17-2005 09:10 AM



All times are GMT -4. The time now is 11:17 AM.