---
layout: page
category-page: fs
category-title: FileSystem
tags: absolute relative path
author: Announ Marwan
title: Absolute paths
---
A path is a location to a folder or file in a file system of a Operating System,
then is a combination of characters and "/".
An absolute path is defined as specifying the location of a file or directory
from the root directory (/).In other words we can say absolute path is a complete
path from start of actual filesystem from / directory.
To write an absolute path-name:
Start at the root directory ( / ) and work down.
Write a slash ( / ) after every directory name (last one is optional).
If for example, we the commands "cat group1.txt", it'll work only and only if the "group1.txt"
exist in the current directory.
If doesn't works, it's not a problem, you just have to know where the file is actually stored.
Now, we suppose that you know where your file is saved so you can rewrite the command.
"cat /home/a1/group1.txt".
As you can see from the last commands, the path started from "/" which is the root directory
for every Unix machines.
Here are some other examples of absolute paths:
- /home/user/Document/group1.txt
- /root/data/dev.zip
- /var/log/messages