Skip to content
Clairos Learn

Terminal basics · Lesson 10 of 34 · 7 minutes

Option patterns

Compare short flags and long listings in a safe directory.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated Linux lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

Reading options carefully prevents wrong assumptions about hidden files or metadata.

ls
List directory entries; -a includes hidden names and -l adds ownership and permission detail.

A listing is not proof that you can read or modify every listed file.

man
Read a short built-in teaching reference for one supported command.

For real administration, check the installed command manual and version too.

Worked example and expected result
$ ls -l /home/learner
ddrwxr-xr-x learner learners   dir archive
ddrwxr-x--- learner learners   dir backups
ddrwxr-xr-x learner learners   dir data
ddrwxr-xr-x learner learners   dir lab
ddrwxr-xr-x learner learners   dir notes
ddrwxr-xr-x learner learners   dir projects
--rw-r--r-- learner learners   148 README.txt
ddrwxr-x--- learner learners   dir restore
ddrwxr-xr-x learner learners   dir scripts

Exit status: 0. The command completed successfully in the training fixture.

$ ls -la /etc
--rw-r--r-- root root    84 crontab
--rw-r--r-- root root    64 group
--rw-r--r-- root root    17 hostname
--rw-r--r-- root root    49 hosts
ddrwxr-xr-x root root   dir logrotate.d
--rw-r--r-- root root    62 motd
ddrwxr-xr-x root root   dir nginx
--rw-r--r-- root root    71 os-release
--rw-r--r-- root root   147 passwd
--rw-r--r-- root root    55 resolv.conf
ddrwxr-xr-x root root   dir ssh
ddrwxr-x--- root root   dir sudoers.d
ddrwxr-xr-x root root   dir systemd

Exit status: 0. The command completed successfully in the training fixture.

$ man ls
LS(1)
NAME
  ls - list simulated directory contents
SYNOPSIS
  ls [-la] [path]
NOTE
  Use -a for hidden dotfiles and -l for metadata.

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Repeat this workflow in the sandbox with a different scratch filename. Keep the system fixtures unchanged and compare the observed output with your expectation before moving on.

Explain it

In “Option patterns”, which interpretation is safe?

Apply it elsewhere

Before adapting the ls workflow from “Option patterns” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Safe movementTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Identity contextUse identity commands before interpreting permissions and logs.Practice
  2. 02Safe movementMove between root, etc, and home while checking location.Practice
  3. 03Quoted pathsCreate and list a path that contains a space.Practice