Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

migrated from stackoverflow.com Aug 4 '10 at 12:30

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

4 Answers

../ 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
add comment

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

share|improve this answer
add comment

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.