absolute path
A path that starts from the top of the file system, such as /home/ana/notes.txt or C:\Users\ana\notes.txt, and so works from anywhere.
In more detail
It names the same file whatever the current directory is. On Linux the leading slash is the root directory, the top of the whole tree, while on Windows an absolute path starts with a drive letter. Scheduled jobs and scripts use absolute paths because they cannot rely on where they are started from.
Example
/tmp/bash-course/work/notes/todo.mdRelated terms
- relative path — A file path given from the current directory, such as site/index.html, rather than from the root of the filesystem.
- file path — A string naming the location of a file, made of directory names separated by forward slashes.
- crontab — The file of scheduled jobs for a user, and the command that edits, lists or installs it.
- path — The location of a file or folder written as the folders leading to it, such as /home/ana/notes.txt or C:\Users\ana\notes.txt.
Taught in
- Moving Around: pwd, ls, cd And Paths — Bash Scripting & Command Line Automation
- What Bash Does To A Line Before It Runs It — Bash Scripting & Command Line Automation
- Shebangs, Permissions And Three Ways To Run — Bash Scripting & Command Line Automation
- Scheduling, Monitoring And A Script That Reports — Bash Scripting & Command Line Automation
- Installing Python On Windows — Hands-on Python: Complete Video Course & Book
- Installing Python On A Mac — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book