PDA

View Full Version : [SOLVED] Reverting back to home after Java is done.



Hosmion
February 22nd, 2011, 11:23 PM
Hello everyone. I am deciding I should go into Java programming. Well, I don't like having to open and close the terminal all the time so I can start on my next program. Is there a way to go backward in the path?

For example:

Suppose I was in:
lenni@ubuntu:~/Desktop/Java/Scripts/IncrementOperators$

How would I get back to:
lenni@ubuntu:~/Desktop/Java/Scripts/

?

Thanks ^_^

myrtle1908
February 23rd, 2011, 12:27 AM
Do you mean to go back one directory in the shell? If so ...


cd ..

Hosmion
February 23rd, 2011, 01:24 PM
That worked, thanks so much!

Portmanteaufu
February 24th, 2011, 03:38 PM
Other useful directory navigation tricks:

Return to your home directory

cd

Return to the previous directory (not necessarily the parent directory)

cd -
(Note: this only works one time. For something that remembers more than one directory, see below.)

Switch directories, but add the current directory to a list of visited directories:

pushd /directory/to/enter

Go backwards in the list of visited directories:

popd

Enjoy! :D