Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Both of these options get us to the same folder, just in different ways. The "long" path (/home/<netid>/c2s2) is known as an absolute path; since it starts from our / directory, it will always point to the same folder, no matter what. In contrast, just typing cd c2s2 will take us to whatever c2s2 directory is under wherever our terminal happens to be at the time, meaning that the folder it takes us to could change! Since this is relative to the terminal's location, we call it a relative path; you'll often find these written as ./c2s2 (where . is our current directory), just to stress that the folder we go to depends on where we currently are. We commonly use relative paths when cd'ing about (as cd c2s2 is synonymous to cd ./c2s2), as they're more convenient and easier to type. However, when specifying file locations to other people of programs, we may want to use absolute paths. Many of the commands that we use will take either.