The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to use find commnad to show only path of the result umen UNIX for Dummies Questions & Answers 1 02-05-2008 03:22 AM
Secondary groups show in groups but don't show in id (Not working) zen03 HP-UX 4 12-31-2007 11:15 AM
vi - replacing a relative path with absolute path in a file Yinzer955i UNIX for Dummies Questions & Answers 2 09-07-2006 11:47 AM
PS1 to show relitive path truma1 Shell Programming and Scripting 2 07-20-2005 06:10 AM
How would I make a find command NOT show the path of a file? LordJezo Shell Programming and Scripting 1 10-01-2004 06:01 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-18-2007
p.vvugt p.vvugt is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 8
Show path name

Hello I'm new to this forum. So please spare me!

I'm using SCO UnixWare 7.1.4 and created a few accounts. So far so good.

When I login I see: $.
But here I want to see (for example),
/home
25$


So I want to see the pathname where I am without each time typing pwd
  #2 (permalink)  
Old 12-18-2007
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
In your login .profile or .bashrc file add this:
Code:
PS1=`hostname`':$PWD> '
This shows the name of the host and path - get rid of `hostname` if you do not want the host name.
  #3 (permalink)  
Old 12-19-2007
p.vvugt p.vvugt is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 8
Hi Jim,

Thanks for your input. Last night I found somewhere else another solution and it's just what I wanted,

Quote:
#
# Cd alias which sets the user prompt
#
if whence _cd >|/dev/null
then
: already set up, do nothing
else
alias cd=_cd

_cd() # CD function
{
cd $1 $2
case $LOGNAME in # include command number in prompt
root) PS1="!# " ;;
*) PS1="`pwd`
!$ " ;;
esac
}
fi

_cd $HOME # Start at home directory
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




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


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0