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 ~
?
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.
The commands cd , and cd ~ are very useful for quickly navigating back to your home directory.
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.
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.
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 ..\..
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With