Posts

Showing posts with the label Absolute

Linux Relative Vs. Absolute Path Top Differences

Image
Linux directories are helpful to store files. Many a time, the programmer would trade in directory paths. The paths are two types - absolute and relative. I have shared simple ideas to remember the differences between these two. Linux Absolute Vs. Relative Path in Linux Below are the differences between these two. 1. Absolute pathname An example is /usr/lib, which is an exact directory in the directory tree.  Think of the absolute pathname as being the complete mailing address for a package that the postal service will deliver to your next-door neighbor. 2. Relative pathname An example is cups, which represents the cups subdirectory of the current directory, whatever that may be.  Think of the relative directory name as giving the postal carrier directions from your house to the one next door so that the carrier can deliver the package. Useful differences, how to differentiate the differences between absolute and real paths. How to go back to the home directory If I type  cd cups  in