Consider the path
./images/1.png
Here ./ means current directory..
ie. single dot in path refer to current directory .
similiarlly ../ refer to its parent directory .ie. two dots in path points to one directory back..
So how many back refernces are possible in a path. ie.is ‘…/’ allowed .If so what is its meaning? . and also meaning of ‘…./’.
?
Also which is correct ‘…./’ or ‘../../’ for the parent directory of the pparent directory of current directory..
Please give me a tutorial on relative paths
Assume that i have access in every directory of the server…
Think of it as “real folders”, where
.is a link to the current folder and..to the parent one. There are no others (as long as you don’t create them, which is possible, but not really usefull), but there is also no need for others. If you want to go up two directories, just go up two directory:../..(and so on).cd myfolderchanges the work directory to the folder “myfolder”cd .changes the work directory to the folder.(which is the current one)cd ..changes the work directory to the folder..(which is the parent one)At all: Nothing special 🙂 Just folders with curious names
You can even type something like
./././, which only means the really “useful” expression “the current directory of the current directory of the current directory”.