1
00:00:06,719 --> 00:00:08,130
Let's talk
about pathnames.

2
00:00:09,210 --> 00:00:15,800
A pathname is the full name from the root directory
to a file. Well, that is, if it's an absolute pathname.

3
00:00:16,480 --> 00:00:19,929
Absolute path means that there cannot be
any doubt about where your file is.

4
00:00:21,050 --> 00:00:24,690
Vars Log messages is an
example of an absolute path name.

5
00:00:25,820 --> 00:00:29,780
There's also the relative path, and the
relative path is related to the current

6
00:00:29,780 --> 00:00:33,740
directory and it contains the rest that
is needed to get to a file.

7
00:00:35,560 --> 00:00:42,219
If your current directory is set
to var logmessages is a relative path.

8
00:00:43,579 --> 00:00:48,100
In relative paths you can
use for one directory up.

9
00:00:49,060 --> 00:00:53,484
That means that if the
current directory is var cache,

10
00:00:53,484 --> 00:00:57,909
then log messages point to
the var log messages file.

11
00:00:59,289 --> 00:01:02,299
If I may give you
a Always use absolute paths.

12
00:01:02,960 --> 00:01:06,090
To avoid any
confusion, let me demonstrate.

13
00:01:07,969 --> 00:01:14,045
When I go to the var directory
and I use LS l var log messages,

14
00:01:14,045 --> 00:01:20,120
then that's an example of an absolute
path name, and that will always work.

15
00:01:20,760 --> 00:01:24,560
I like absolute paths because you don't
have to think about your current location.

16
00:01:25,120 --> 00:01:29,575
But if I would use LS
l logmessages, then then it's going to

17
00:01:29,575 --> 00:01:34,030
make it relative to the current
directory and then it also works.

18
00:01:35,489 --> 00:01:41,810
Even you could use dot slash log messages,
where the dot slash is not really necessary, but

19
00:01:41,810 --> 00:01:48,129
dot is your current directory, and this means
in the current directory, look for log messages.

20
00:01:49,390 --> 00:01:53,849
Now let's go somewhere
deeper into the empty directory.

21
00:01:55,079 --> 00:01:59,750
What is this empty directory all about? Well,
it's an empty directory, probably. That makes sense.

22
00:02:00,349 --> 00:02:06,765
Now how about I use LS on log messages? Does
that work? No, it doesn't work because it would look

23
00:02:06,765 --> 00:02:13,180
in the current directory for a subdirectory with the name
log and then for a file with the name messages.

24
00:02:14,460 --> 00:02:19,415
We can fix that by putting in
front of it, which means that it goes

25
00:02:19,415 --> 00:02:24,370
up from var empty to var, and
and in var it looks for log messages.

26
00:02:24,939 --> 00:02:25,650
And that
would work.

27
00:02:26,250 --> 00:02:30,769
And as I told you, if you think
that is complex, well, just make it an

28
00:02:30,769 --> 00:02:35,289
absolute path, because absolute paths always work
and you don't have to worry about them.
