Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-15-2008, 10:03 PM   #1
LQ Newbie
Registered: May 2008
Posts: 2

Rep: Reputation: 0
Help Please!! -- need to find command that will switch you back to your previous CWD

Hello. Can anyone tell me what the command is to switch back to your previous current working directory? Any help is greatly appreciated. Thanks!

-- Tron
Old 05-15-2008, 10:11 PM   #2
Registered: Mar 2008
Posts: 73

Rep: Reputation: 16
cd - # add the dash after a space,

the previous directory is also stored in a variable
called OLDPWD so

cd $OLDPWD would also work, or you could copy files from
your new directory to the old using something like

cp filea $OLDPWD
Old 05-15-2008, 10:35 PM   #3
LQ Newbie
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you!

Yes, exactly what I was look for (cd -).

Thanks alot -- I've got a test tomorrow morning and that question was asked on the study sheet, but I couldn't find it anywhere in my text book, so your help is greatly appreciated. Thanks again.

-- Tron


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can you roll back to a previous version 7.10 of Kubuntu or fix 8.04 twlaaas Linux - Newbie 3 05-02-2008 12:58 PM
Go back to previous kernel? keith2045 Linux - General 9 11-07-2007 11:25 PM
How to revert back to a previous kernel in REL 3.0? cygnus-x1 Red Hat 6 08-29-2006 06:33 PM
can't find cwd while building perl dombrowsky Linux - Software 3 02-15-2006 01:30 AM
how to revert back to the previous kernel version? prav_284 Red Hat 3 12-10-2003 03:51 AM

All times are GMT -5. The time now is 10:52 AM.

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