Paths and navigation
The Unix filesystem is a tree rooted at /. Navigation is a combination of path awareness and safe movement.
Absolute vs relative
- Absolute: Starts at
/(example:/var/log). - Relative: Starts from your current directory (example:
../logs).
Recommended practices
- Use
pwdoften to confirm context. - Prefer absolute paths in scripts.
- Avoid
cdchains in production scripts; use explicit paths.