4
8
Could anyone explain the difference between ../ and ./ please.
../system
./system
My understanding is that ../
is the root directory.
But I don't know what ./
means.
4
8
Could anyone explain the difference between ../ and ./ please.
../system
./system
My understanding is that ../
is the root directory.
But I don't know what ./
means.
31
./
means the current directory
../
means the parent of the current directory, not the root directory
/
is the root directory
myfile.text
is in the current directory, as is ./myfile.text
../myfile.text
is one level above you and /myfile.text
lives in your root directory.
6
. Current Directoy
.. Parent Directory
./system
means, a directory/file
called system in the current directory.
However, there would be little use preceding "system" with a "./" if it is a directory -- it's probably an executable. In UNIX/Linux systems, the current directory is not included in the search path for executables, so to run an executable in the current directory, you would preced it with "./" – aviraldg – 2009-10-01T11:11:10.377
4
The . and .. are relative directories to your current location.
The . is the current directory. eg "this". The .. is the previous directory. eg "this.parent".
3
... which means:
However, there would be little use preceding "system" with a "./" if it is a directory -- it's probably an executable. In UNIX/Linux systems, the current directory is not included in the search path for executables, so to run an executable in the current directory, you would preced it with "./" – aviraldg – 2009-10-01T11:10:07.710
Oh yeah it might be a regular file as well. – Tamas Czinege – 2009-10-01T11:11:17.973
1
../ is the directory above this one
./ is the current directory
1
./ means the current directory.
3To add more detail for future readers: ~/ is your home directory, and you can combine the operators above: ../../file would be a file two directories below. – Rich Bradshaw – 2010-01-18T11:20:03.990