Moving around directories: pwd, cd and ls
You get to know the Linux file system tree, move with absolute and relative paths, read details, hidden files, sizes and times with ls options and search names with find; at the end you find a forgotten password file and a lost contract in the shared folder on your own.
Level 101 · 45 min
Northwind Logistics’ IT team has handed you the shared file server. Team lead Daniel says: "First learn where everything is on the server. You can’t protect what you can’t find."
On Linux everything sits in one tree. The root of the tree is /; every folder (directory) is below it. There are no separate drives like C: and D: on Windows. Analogy: picture a huge filing cabinet. The top drawer is /, and each drawer inside it is a directory.
In the first steps of the lesson I give you the commands; as you go on the help fades, and in the last steps you only see the goal. If you get stuck, look at the hint; after two wrong tries I show the solution too.
What you will do in this lesson
- Where are you, what is at the root?
- Go with an absolute path: cd /var/log
- Relative paths and dot-dot: cd reports/2026, cd ..
- Details and hidden files: ls -l, ls -la
- Size and time: ls -lh, ls -lS, ls -lt
- Type less: Tab, ↑ and history
- Search by name: find -name
- Find the lost contract
- The inventory report
- Short quiz
Skills you will earn
- Knowing the Linux file system tree (/etc, /var/log, /home, /srv)
- Changing directory with an absolute path (cd /var/log)
- Moving with relative paths and ..
- Reading the columns of ls -l output
- Seeing hidden files with ls -a
- Sorting files by size and time (ls -lhS, -lt)
- Working fast with Tab completion, history and cd -
- Searching files by name (find -name, -type)
- Listing with subdirectories (ls -R)
- Going back home (cd, ~)
← Short task: write the ID card of the server and your account · Linux quick start · File operations: mkdir, cp, mv and rm →
Start for free