Transcript from the "Paths" Lesson
>> James Halliday: The next thing that I wanted to talk about is sort of a little bit more information about how paths work. Because it's kind of important to know how paths work and what the expectations are if the path's in a directory system. So, we've already used things like dot and dot dot a little bit, and tilde.
[00:00:22] So, paths that use '.' and '..' at the beginning are called relative paths. This also includes something like if you do, if I do like head moby-dick.txt, this is an example of a relative path, because it's relative to the current directory. It's also the same as doing ./ the file, it's also the same as a bunch of, as many dot slashes as you want, cuz it means the current directory.
[00:00:51] These are all examples of relative paths. Where if I want to do ls ../ also an example of a relative path, because what directory you're in, what your current working directory is, Matters. There's also absolute paths which typically begin with a slash or I guess if you begin a path with tilde that's also an example of an absolute path.
[00:01:16] And with these paths it doesn't matter where you are in the directory system with the CD commands, they will work. The same from anywhere. And if you want to get the absolute path for the current directory, we've already seen the pwd commands. So if I do ls, that absolutely path, that's the same as doing ls.
[00:01:39] Or just just ls, okay?