Full Path Name
What is a full path name?
|
As opposed to the relative path name, from the current directory, the full path name is the path from /.
|
Hello Juve_It!
A full path name is the complete(absolute) location of some file or link. Example of : Code:
#!/bin/sh/ That's a full path on Linux shell. See the "~/docs/work/todo.txt" thing? That's a relative path that does exactly the same as the full path but is easier to type and is dependent of your working directory. On linux a path usually starts with a slash character '/'. cheers! |
Quote:
A relative path would be something like: Code:
rel_path="docs/work/todo.txt" The difference with the above is: Code:
rel_path="~/docs/work/todo.txt" The real gotcha here is that if someone else executes the script it will look in their home directory Whereas a full (or absolute) path would be: Code:
abs_path="/home/some_user/docs/work/todo.txt" |
Ah! A relative path is made with variables!
thanks for pointing it out grail. And sorry for the original poster. cheers! |
Actually, the '~' thing is only for someone's home dir (that's a fixed convention, not a variable). A relative path in general means not starting at root ie '/', so for eaxmple
../../some/dir is a relative path; in this case, go up 2 dirs, then down into some/dir. |
Hi,
Welcome to LQ! Quote:
Just a few more links to aid you to gaining some understanding. Sure some may seem beyond a newbie but you must start somewhere; Linux Documentation Project Linux Command Guide Utimate Linux Newbie Guide LinuxSelfHelp Getting Started with Linux Bash Beginners Guide Bash Reference Manual Advanced Bash-Scripting Guide Linux Home Networking The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links! :hattip: |
All times are GMT -5. The time now is 11:19 PM. |