LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Goto Parent Directory (https://www.linuxquestions.org/questions/linux-newbie-8/goto-parent-directory-398872/)

anjanesh 01-02-2006 11:31 PM

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

Nylex 01-02-2006 11:44 PM

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

anjanesh 01-03-2006 12:01 AM

Ah...thanks...all this time I was typing cd.. (no space in b/w cd and ..) which works in Windows.

merchtemeagle 01-03-2006 12:16 AM

You can put alias 'cd..'='cd ../' in your .bashrc file in your home directory.

jrdioko 01-03-2006 12:30 AM

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.

merchtemeagle 01-03-2006 12:43 AM

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. :)

jrdioko 01-03-2006 12:46 AM

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 :)


All times are GMT -5. The time now is 06:28 AM.