LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-02-2006, 11:31 PM   #1
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Rep: Reputation: 30
Goto Parent Directory


Say Im in /dir1/dir2/dir3/dir4
Im using Putty and each time I got to type cd /dir1/dir2/dir3 to goto dir3.
Whats the Windows equivalent of cd.. ?

Thanks
 
Old 01-02-2006, 11:44 PM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
It's the same thing under Linux, "cd .." will take you up a level.

Last edited by Nylex; 01-02-2006 at 11:45 PM.
 
Old 01-03-2006, 12:01 AM   #3
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
Ah...thanks...all this time I was typing cd.. (no space in b/w cd and ..) which works in Windows.
 
Old 01-03-2006, 12:16 AM   #4
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
You can put alias 'cd..'='cd ../' in your .bashrc file in your home directory.
 
Old 01-03-2006, 12:30 AM   #5
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
As a brief explanation, "cd" is "change directory", "." is an abbreviation for the current directory ("pwd"), whatever that may be, and ".." is an abbreviation for the parent directory (one directory back). They're useful in many contexts besides "cd ..", e.g. things like "cd ../dir1" or "./blah.sh" to run a file not in your PATH.
 
Old 01-03-2006, 12:43 AM   #6
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
Quote:
Originally Posted by jrdioko
the current directory ("pwd"), whatever that may be.
Print Working Directory

edit: I get what you mean, whatever the current directory may be.

Last edited by merchtemeagle; 01-03-2006 at 12:45 AM.
 
Old 01-03-2006, 12:46 AM   #7
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Quote:
Originally Posted by merchtemeagle
Print Working Directory
Meant that as "pwd" will print your working directory, whatever your working directory happens to be at the time. But that works too
 
  


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
.htaccess restricting parent directory Braytac Linux - Networking 2 05-26-2005 05:27 PM
'cp -rv .*' recurses into the parent directory??? stefanlasiewski SUSE / openSUSE 5 02-02-2005 05:36 PM
java - parent directory problem ludeKing Programming 8 10-07-2004 07:25 PM
List only the parent directory scottrell Linux - General 6 11-07-2003 09:10 AM
mv the contents of one directory to the parent directory warkrime Linux - Newbie 4 07-14-2003 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 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