What is the difference between ./ and ../?

../ refers to the parent folder while ./ means the current folder


. means 'the current folder'.
.. means 'the folder containing the current folder'.


just in case you wonder, ./filename actually means the same thing as filename - however, on unix systems, the current path isn't searched for executables (for security reasons), so you have to explicitly say "look in the current directory"


Both are different. ./filename points to a file in current directory while ../filename points to a file in parent directory


Both ./ and ../ are the ways to describe a file-path. As all suggested above you can use ./ while your file is in the current folder and ../ while your specified file is in the parent directory. Generally, it is useful while your current folder and parent folder both contains the file with the same name. Then these are very helpful to get the exact file from the folder you have specified.

Ex.

  • image in current folder: "./profile1.jpg";
  • image in parent folder: "../Images/profile1.jpg:"