Linux, terminal and Git

Stage 2 · Lesson 3 of 9

Wildcards and quoting

Shell basics

Before a command runs, the shell expands patterns into real file names. This is called , and the special characters are wildcards. * matches any characters, ? matches exactly one, and [abc] matches one of a set.

So *.md turns into the list of all files in the folder. Braces build lists too: mkdir {src,tests,docs} makes three folders. controls all of this.

Single quotes keep text exactly as written. Double quotes still fill in variables such as $HOME. A backslash protects a single character.

A file name with a space needs quotes, or the shell splits it into two separate . Understanding this explains many "file not found" errors.

Common trapleaving variables unquoted in scripts, so a name with a space breaks the command.

A question to check yourself, an AI practice session and 2 cheat sheet entries come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

Practise

  • A game played over SSH where each level needs a new command, from `ls` to finding hidden files

Keep handy

  • Paste any command and see what each part does before you run it

  • Short, example-first help pages for common commands when a man page is too long

Also worth your time

Mark this stage as not done?