Lazo Lab Sign up

Linux & the Command Line / Terminal basics

Lesson 8 of 30

Wildcards

* matches anything and ? matches one character. *.log means every file ending in .log.

Key points

  • * any characters
  • ? exactly one character
  • Check with ls before using rm
ls *.py
rm temp?.txt
Watch a video on thisOpens YouTube search results for “Wildcards” in a new tab

Quiz · +10 XP

Which pattern matches every .txt file?

Log in to save progress and earn XP.