Solved

Absolute Linux newbie...user command current directory?

Posted on 2007-03-18
7
267 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
  • 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ubuntu not booting - How get past GRUB? 3 43
Best way to virtualise a remote Linux server 2 68
ifconfig 4 46
error log using ftp 7 41
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

809 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