The path
⌨️ Terminal TricksLesson 9 of 30 5 min 30 XP

🃏Wildcards and hidden files

The star * stands in for anything, and files that start with a dot like to hide.

Typing every file name is slow. A wildcard is a joker card that stands in for any characters. Linux swaps it for matching names before the command even runs.

Commands in this lesson

ls *.txtEvery file ending in .txt
welcome.txt
ls pen*Everything starting with pen
penguins/
cp *.txt notes/Copy all text files at once
ls -aShow hidden files too
.config   notes   penguins   welcome.txt

Why files hide

A file whose name starts with a dot is hidden. It is not secret or protected, just tucked away so the folder looks tidy. Settings files usually hide this way.

🐧 Tux tip

? stands in for exactly one character: file?.txt matches file1.txt and fileA.txt but not file10.txt.

Now you try

This terminal is pretend, so you cannot break anything. Tap a chip or type a command yourself.

tux — bashpractice

Try the commands from this lesson. Type one and press Enter, or tap a chip below.

penguin@tux:~$
try

Quick check

What does *.txt match?

Why can't you see .config with a plain ls?

Finished this one?

Mark it done to collect 30 XP and keep your streak growing.