dot and dot dot
The special directory names dot, meaning this directory, and dot dot, meaning the parent directory, which exist in every directory.
In more detail
They let a relative path refer to where you are or climb upward, as in ./script.sh or cd .. to go up one level. The ./ prefix is how you run a program in the current directory, because the shell does not search the current directory unless PATH says so.
Related terms
- relative path — A file path given from the current directory, such as site/index.html, rather than from the root of the filesystem.
- PATH — An environment variable holding a list of folders the shell searches, in order, to find the program for a command you type.
- ls — The command that lists the files and directories inside a directory.
Taught in
- Moving Around: pwd, ls, cd And Paths — Bash Scripting & Command Line Automation
- Shebangs, Permissions And Three Ways To Run — Bash Scripting & Command Line Automation