Doubt in The Linux Command Line


In the first line fun is the file while fun-sym is the link
In the second and third line why is it necessary to add “…/” before fun? Not adding it creates a broken link.
Please Explain.
Thank you for your Help!

Hi @Gokul,

I do not know is this’ll help explain it or not, but:

  • .. in a directory path, like above, will navigate to the current directory’s parent; while
  • . in a directory path means the current directory.

So the ../fun actually means the file/directory in the current directory’s parent.

If you referenced a file/directory prepended with ./, for example ./fun, it would be the same as referencing said file/directory without the prepended ./, fun in this example’s case.

Hope this helps some with figuring out your problem.

2 Likes

Thanks man, Got it!

You are very welcome!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.