syntax
Hello
Can someone please tell me what ../../ mean below: Code:
ln -s ../../images /tftpboot/proxy/bios/images |
|
very informative
|
Can you please mark your thread as [SOLVED] (see HOWTO in my sig) if you have no further question on this topic anymore?
|
I was hoping someone could explain to me the ../../ bit
I understand that / is the root directory; ./ is the current directory; ../ is the parent of the current directory. Does that mean ../../ is the same as /? Thank you |
Quote:
Assuming of course that there *are* two directory levels in the structure above the current directory (../ when you are already at root leaves you still at root). Edit: To answer your question, ../../ only works out to be the same as / if you start at root or a maximum of 2 directory levels beneath it. |
Quote:
../../../<some_path> as to make that link relative to the directory it's IN instead of absolute (that is: starting with a /). This is to assure that the link still works, even when the whole tree is relocated (mv'd) to another place, which may be higher OR lower in the hierarchy. |
Quote:
|
Quote:
|
Quote:
I hope that matter is clearer for you now :) |
Quote:
To me it means "back two" If you have ../../../ it means "back three" Obviously starting with ../, that means "back one" and thus as you repeat, it just adds more to how far you are going back. I would have to say that specifying a very long string like that becomes tedious and thus for command line, I'd make a decision to start back at some origin, like my home, or the root path, and then build up from there, also relying on tab completion of trings. In a script, I'd probably set a variable to define an origin directory. Like what is done in makefiles. |
All times are GMT -5. The time now is 06:32 AM. |