LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-01-2004, 08:08 AM   #1
linuxnube
Member
 
Registered: Oct 2003
Location: US
Distribution: Fedora C1 & C2
Posts: 81

Rep: Reputation: 15
remember visited directories in shell


In the command shell (fedora default shell), is there a way to remember where I've been?

It seems I remember from a long time ago, the ability to push the currect directory onto a stack when I cd'ed elsewhere and then pop back when I wanted. Now this could have been a different OS (I don't remember) but I am hoping it is possible under the Linux shell.

Thanks!
 
Old 07-01-2004, 08:52 AM   #2
cck23
Member
 
Registered: Jun 2004
Location: Surrey, UK
Distribution: Mandrake 10 Download
Posts: 73

Rep: Reputation: 16
Not sure if this is any help to you, if you type "cd -" then you will go back to the directory that you cd'd from.

Useful for popping into a directory to do something and then back again.

CK
 
Old 07-01-2004, 01:48 PM   #3
linuxnube
Member
 
Registered: Oct 2003
Location: US
Distribution: Fedora C1 & C2
Posts: 81

Original Poster
Rep: Reputation: 15
This is exactly what I was looking for!

Thanks!
 
Old 07-01-2004, 05:27 PM   #4
cck23
Member
 
Registered: Jun 2004
Location: Surrey, UK
Distribution: Mandrake 10 Download
Posts: 73

Rep: Reputation: 16
you are most welcome, have fun
 
Old 07-11-2004, 01:40 PM   #5
linuxnube
Member
 
Registered: Oct 2003
Location: US
Distribution: Fedora C1 & C2
Posts: 81

Original Poster
Rep: Reputation: 15
pushd and popd are of course, the comnplete solution.

-ks
 
  


Reply



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
shell script: delete all directories named directory.# except directory.N brian0918 Programming 3 07-13-2005 06:54 PM
the 1024 cylinder limit visited... ngjunkie0011 SUSE / openSUSE 5 07-04-2005 10:46 AM
Shell scripting, getting directories atlep Programming 2 09-30-2004 11:21 AM
Bug report: wrong date/time format in last visited wipe LQ Suggestions & Feedback 0 07-29-2004 06:21 AM
Galeon won't keep changes to visited link color oot Slackware 1 12-26-2003 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:55 AM.

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