Navigating Directories
00:00
One of the commands I do to sort of locate myself a lot is the ls
(list) command, just to see what I’ve got in my folder, what I’m working with. So that’s usually where I start out. Oh, nice. And on Windows, I just glanced over it before, but you also see the directory when you are using the ls
command.
00:18
Yes. It gives you a very verbose output, similar to what you’d get with ls -l
, I believe, in Linux. Yes. That comes by default. It has a lot of detail there.
00:30
Okay, so let’s change into the hello\
directory and see if you actually copied the file in there. Okay, yes. Let’s cd
into there then. cd .\hello\
00:41 and then we can just list the contents of where we are since our current working directory has changed. And we can confirm—And there is the file— That the file has been created and has been copied.
00:55
Wonderful. So now that I got the proof, let’s change back into the pb_terminal\
directory. Okay. The way I go back in directories— You can do it two ways.
01:07
You can always see cd
to the absolute path, which means typing in the whole thing. So I could do—Nobody wants to do to do this, right? Right. That’s way too much typing.
01:18
But you can do it that way. But the shortcut is you can use ..
(dot dot). cd .
means this directory. The .
is just a shorthand for the current working directory, and ..
is the parent. And as you can see, the prompt has shrunk after that command. Okay. So yeah, you would use the full path if you wanted to change into any other directory on your system, but if you’re just moving into like the directory before, you use ..
(dot dot).
Become a Member to join the conversation.