Muhammad Noorani
Relative Path and Absolute Path
- Relative path specifies the location of a file or directory relative to the current working directory, whereas an absolute path specifies the exact location of a file or directory from the root directory. whatis ls
ls(1) - list directory contents
.
: This flag represents the current directory. ..
: This flag represents the parent directory of the current directory. It is often used to move up one level in the directory hierarchy. For example, cd ..
would move the user up one level in the directory hierarchy. ~
: This flag represents the user's home directory. It is often used to refer to the home directory of the current user. -
: This flag represents the previous directory. It is often used to quickly switch between two directories. /
: This flag represents the root directory of the file system. It is often used to refer to the top-level directory in the file system hierarchy.