Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

when we specify the file path some times we specify like ./filename and some time ../filename what is difference between these two?

share|improve this question

migrated from Aug 4 '10 at 12:30

This question came from our site for professional and enthusiast programmers.

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

share|improve this answer
they are just a shortcut, so you dont have to write out long directory names. – Keltari Aug 25 '11 at 2:41

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

share|improve this answer

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"

share|improve this answer

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

share|improve this answer

You must log in to answer this question.