How Do You Create a Relative Path in Unix?
Contents

How do you set a relative path in Unix?

UNIX offers a shortcut in the relative pathname– that uses either the current or parent directory as reference and specifies the path relative to it. A relative path-name uses one of these cryptic symbols: . (a single dot) – this represents the current directory. ..

How do you create a relative path in Linux?

Relative path of the file or directory that is below in hierarchy always starts with a single dot followed by a forward slash as ./ . The ./ represent the current directory.
…
Single dot (.) and double dots (..) in Linux.

Command Description Path
./simple.sh Run script from current directory Use relative path
David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest