Solved

Absolute Linux newbie...user command current directory?

Posted on 2007-03-18
7
278 Views
Last Modified: 2008-02-20
Absolute Linux newbie...

What is the user command for telling me what is my current directory?

tnx,

- avi
0
Comment
Question by:progtw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 25 total points
ID: 18744710
pwd
0
 
LVL 20

Assisted Solution

by:nedvis
nedvis earned 25 total points
ID: 18744730
pwd  ( stands for printe working directory )
0
 

Author Comment

by:progtw
ID: 18744743
you are correct.
thanks.
that's a strange long mnemonic.

why doesn't it just use "cd", which is anyway also a command in Linux?
avi
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 48

Expert Comment

by:Tintin
ID: 18744754
cd is for changing directories, not printing them.

If you want the current directory to always be displayed in your prompt and assuming your default shell is bash, do:

export PS1='\w$ '

You can add that to your .bash_profile if you want it to be permanent.
0
 
LVL 20

Expert Comment

by:nedvis
ID: 18744966
There  are even more "strange  logic" ( at least to me)  in some Linux/Unix commands.
Command "which" , for instance, does not say anything about of what kind something is .
but rather  WHERE certain  executable file is located within file system.
type
which xterm
or
which oowriter
and "which"  will tell you where X terminal and OpenOffice wordprocessor module executable files sit
on your machine ( in my Vector Linux 5.8 it's  /usr/bin/xterm  and /opt/openoffice.org2.0/oowriter )
0
 
LVL 20

Expert Comment

by:nedvis
ID: 18744979
Tintin, I really, like you tips!
0
 
LVL 48

Expert Comment

by:Tintin
ID: 18745220
Think of 'which' as in "which portion of my PATH is the command located".  It's true, where would have been more logical, but there is the whereis command for that.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question