technote:paths
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
technote:paths [2022/04/01 00:13] – created Scott Cunliffe | technote:paths [2025/01/21 22:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Absolute And Relative Directory Paths ====== | ====== Absolute And Relative Directory Paths ====== | ||
+ | ===== Absolute Path ===== | ||
+ | |||
+ | An absolute path is a path that describes the location of a file or folder regardless of the current working directory; in fact, it is relative to the root directory. It contains the complete location of a file or directory, hence the name. It is also referred to as absolute pathname or full path and it always starts at the same place, which is the root directory. | ||
+ | |||
+ | Root directory in Windows contains the drive identifier and path to the sub directory or file. An example for an absolute path to the file TMSS10Inventory is: | ||
+ | |||
+ | < | ||
+ | C:\Program Files\TapeTrack\TapeTrack Server Utilities\bin\tapetrack\TMSS10Inventory | ||
+ | </ | ||
+ | |||
+ | Root directory in Linux starts at the root directory and path to the sub directory or file. An example for an absolute path to the file TMSS10Inventory is: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ===== Relative Path ===== | ||
+ | |||
+ | A relative path is a path that describes the location of a file or folder in relative to the current working directory. | ||
+ | |||
+ | For example starting from within | ||
+ | |||
+ | < | ||
+ | C:\Program Files\TapeTrack\TapeTrack Server Utilities | ||
+ | </ | ||
+ | |||
+ | the relative path to TMSS10Inventory would be | ||
+ | |||
+ | < | ||
+ | .\bin\tapetrack\TMSS10Inventory | ||
+ | </ | ||
+ | |||
+ | but if you were in the directory | ||
+ | |||
+ | < | ||
+ | C:\Program Files\TapeTrack | ||
+ | </ | ||
+ | |||
+ | the same relative path would be referring to the wrong location of | ||
+ | |||
+ | < | ||
+ | C:\Program Files\TapeTrack\bin\tapetrack\TMSS10Inventory | ||
+ | </ | ||
+ | |||
+ | |||
+ |
technote/paths.1648772008.txt.gz · Last modified: 2025/01/21 22:07 (external edit)