LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-04-2004, 03:09 PM   #1
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Rep: Reputation: 31
Going back...


just a questions...

say you are in the root directory... and cd "/", cd "usr", cd "include"... then you would be in

/usr/include but when you /usr/include/cd why does it go to /home/mydirectory instead of to /usr like in DOS

what is the command in linux to go back a directory... like in DOS?

thanks in advance...
 
Old 05-04-2004, 03:15 PM   #2
Bebo
Member
 
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 30
To go up one level, use cd ..

Mind the space between cd and the two dots.
 
Old 05-04-2004, 03:16 PM   #3
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
cd ..
 
Old 05-04-2004, 03:16 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
You are correct just typing in:
cd
in any working directory is a shortcut back to your home directory.

cd ..
will go back a directory just like DOS.
 
Old 05-04-2004, 03:19 PM   #5
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 31
thanks... hehe... well i used to type "cd.." no spaces, no wonder it didn't work... thanks again...
 
Old 05-04-2004, 04:18 PM   #6
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
just a hint.. I wish I would of know this when i first got started... you can use ".." to go back a directory as many times as you need...

For instance you are in /usr/local/share/apps/SomeApp and you want to cd from there to /usr/local/bin

you can do this

cd ../../bin

it takes you down two directoires then back up to bin

once again.. just sharing because this was something I wish I knew when i first started using linux.
 
Old 05-04-2004, 07:20 PM   #7
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
"once again.. just sharing because this was something I wish I knew when i first started using linux"

Thanks. I learned something today without asking. That's why I hang out at LQ.
 
  


Reply


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
Im Back londonboi General 2 02-24-2005 03:39 PM
Back again raving LinuxQuestions.org Member Intro 1 09-05-2004 03:22 PM
why I will not go back jackassjim LinuxQuestions.org Member Success Stories 4 09-05-2004 06:07 AM
Back Here Again ! :) rvijay General 5 07-16-2004 04:35 AM
Back button to Go Back? javamdk Linux - Newbie 2 07-09-2004 12:34 AM


All times are GMT -5. The time now is 02:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration