Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

going back to directory

Tags:

powershell

My current directory is

C:/users/admin/temp

Next, I navigate to

C:/users/admin/temp/1/2

How do I get back to temp without using pushd command at temp and just go to temp with one command without going home or doing cd ~?

like image 576
Dan Mehra Avatar asked Mar 20 '15 15:03

Dan Mehra


People also ask

How do I go back to previous directory?

cd path-to-directory : The command followed by a path allows you to change into a specified directory (such as a directory named documents ). cd .. (two dots). The .. means “the parent directory” of your current directory, so you can use cd .. to go back (or up) one directory.

Which command is used to go one directory back?

The commands cd , and cd ~ are very useful for quickly navigating back to your home directory.

How do I go back one directory in a folder?

How do I go back a directory in command prompt? Type. cd.. into the prompt. After you press Enter, this command tells the program to navigate back to the previous folder.

How do I navigate to a directory?

We'll use "cd" to move down as well as up the directory structure. The second way to list files in a directory, is to first move into the directory using the "cd" command (which stands for "change directory", then simply use the "ls" command.


1 Answers

Use Push-Location and Pop-Location instead of cd (aka, Set-Location).

Or, if you just want to traverse up the directory heirarchy two levels, you can use cd ..\...

like image 69
Bacon Bits Avatar answered Oct 06 '22 05:10

Bacon Bits