Understands relative file paths. The start of your Terminal command line always displays the current directory you are located in. By default, this is your Home directory, named after your username. A relative file path begins with
./ or with no special characters, and describes the file's location in relation to your current directory.
[3] If you're having trouble figuring this out, follow these steps:
- Enter pwd to check your current directory. The file you are trying to open must be within this directory, not at a higher level.
- Find your current directory in Finder. Open a series of folder until you reach the file you'd like to open.
- Type in the names of the folders you opened in order, separated by / symbols, then end with the file name. For example, open Documents/Writing/Novel/ch3.pdf. (You may start with ./ in front of Documents for the same result.)