Paths

A path is a list of directories separated by the / character.

There are two types of paths: 1. absolute 2. Relative

Absolute Path

  • Specify the exact location of a directory
  • Always shows the full location
  • Starts from the root directory (/)
  • Example: /home/user/Documents/file.txt

Relative Path

  • Based on the current directory(start from the currecnt location)
  • Does not start with /
  • Example: Documents/file.txt, ../images/pic.png