How Do You Set a Relative Path in Linux?
Contents
Command Description Path
cat ./dir1/abc Print the contents of the file abc. Use relative path. Include current directory

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. ..

What is the difference between an absolute path and a relative path?

A path is either relative or absolute. An absolute path always contains the root element and the complete directory list required to locate the file. … A relative path needs to be combined with another path in order to access a file. For example, joe/foo is a relative path.

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest