Open main menu

CDOT Wiki β

Changes

OPS102 - Filesystem Basics

337 bytes added, 03:16, 18 September 2023
Relative Pathnames
Any pathname that does not start with a slash/backslash or a tilde character is a ''relative'' pathname, which is interpreted as starting at the current directory.
If the current directory is <code>/home/kim/ops102</code>, then the Linux pathname
presentation.pdf
/home/kim/ops102/presentation.pdf
The symbol ".." means the parent directory. Assuming the same current directory as above (<code>/home/kim/ops102</code>), the Linux pathname
../Downloads/example.txt
/home/kim/ops102/test.odt
 
Likewise, if the current directory on a Windows system was <code>\Users\kim</code>, then the pathaname
 
ops102/presentation.pdf
 
refers to the absolute pathname
 
\Users\kim\ops102\presentatin.pdf
 
And the relative pathname
 
..\Downloads\example.txt
 
refers to the absolute pathname
 
\Users\kim\Downloads\example.txt