Saturday, May 31, 2008

What is relative path and absolute path?

  1. Absolute path : Exact path from root directory.
    Relative path : Relative to the current path.
  2. absolute path is from home directory to user directory..

    but

    relative path is from present working directory to user directory.

    Ex:

    Say, your current working directory is /home/tst

    If there is sub-dir called scripts here, then

    the absolute path for the sub-dir is /home/rama/scripts

    and

    relative path is scripts or ./scripts (relative to /home/rama)

No comments: