Absolute and Relative paths

preview_player
Показать описание
This is a description of the difference between absolute and relative paths on a unix system. Absolute paths start from the root directory and look like this:

/afs/.ir/users/c/g/cgregg/cs107/assignments/assign0/hello

They aren't fun to type, and often we refer to files by their "relative" path, using the three shortcuts, ~ (home directory), . (current directory), and .. (parent directory).

From my home directory, the above file would simply be:

~/cs107/assignments/assign0/hello

If was in the assign0 directory, the hello file is just:

./hello

And if I was in a sibling directory, assign1 to the assign0 folder, the hello program would be at:

../assign0/hello
Рекомендации по теме
Комментарии
Автор

Great video but I still don't get it yet. I will continue practicing. Thanks!

tramellmalone