# Absolute and Relative Paths

* A path identifies the location of a file or directory.

## Absolute Paths

* An absolute path always starts **from the root directory** **`/`**.
* It is valid from anywhere on the file system, use it when certain of the location.
* Sometimes relative path can be longer than the absolute path, so an absolute path is prefered.

```bash
ls /var/log/syslog
# /var/log/syslog is an absolute path to the syslog file
```

## Relative Paths

* A relative path starts **from the current directory** to the resource.
* Is generally shorter than an absolute path, used for similar local directory structures, for projects.

```bash
cd /var
ls log/syslog
# log/syslog is a relative path

ls ./log/syslog
# Using "." it specifies the commands starts in the current working directory

ls ../home/user/Documents/
# ".." is the parrent of the current working directory
```

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.syselement.com/tcm/courses/linux-101/3-filesystem/paths.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
