Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-26-2012, 02:18 AM   #1
LQ Newbie
Registered: Dec 2012
Location: India
Distribution: Ubuntu
Posts: 8

Rep: Reputation: Disabled
why prompt doesn't get updated ?

Linux noob question.
Lets say i have a sub directory called 'a' under 'test'
now when i rename the directory from above location using mv ../a ../b
i am still left inside the :~/test/a and continue to work as normal while pwd shows the :~/test/b

Is there a way to make changes to command prompt so that it updates the location.

Last edited by .product; 12-26-2012 at 02:21 AM.
Old 12-26-2012, 03:27 AM   #2
Senior Member
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
If you cd up to the parent directory (in this case test) and then cd back into the newly named b subdirectory the pwd command will be updated to show the working directory to be b. I don't think you can get the terminal to update the location until you leave that directory.

And welcome to the LQ forums!
Old 12-26-2012, 06:23 AM   #3
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,552

Rep: Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898
Or you could cd into the current directory:
$ cd .
If you want to really freak yourself out try this:
$ cd test/a
$ rm -rf ../a
You will find that you are still in the a directory until you move elsewhere
Old 12-27-2012, 07:24 AM   #4
LQ Newbie
Registered: Dec 2012
Location: India
Distribution: Ubuntu
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks folks.
It was indeed freaky


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
primary screen doesn't work anymore since i've updated Capozzi Linux - Newbie 1 10-26-2012 08:50 PM
A distro that doesn't require 'core' components to be updated chessonly Linux - General 4 06-02-2009 09:25 AM
Linux doesn't see updated /etc/modules.conf svele Debian 5 04-15-2004 08:01 AM
Updated FC1 Kernel doesn't support usb... Ryknow215 Fedora - Installation 5 01-29-2004 11:41 AM
Updated Mozilla, JVM doesn't work anymore GT_Onizuka Linux - Software 9 10-17-2003 01:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration