Wildcards
Talk about a whole group of files at once.
The * is a wildcard meaning "any characters at all". The shell swaps *.txt for every matching name BEFORE the command even runs, so ls never sees a star: it sees pets.txt shopping.txt.
That is worth knowing, because it means wildcards work with every command, not just ls. cp *.txt backup/ copies them all; rm *.txt deletes them all, which is exactly as dangerous as it sounds.
The star can go anywhere in a name. s* means "every name starting with s"; *e* means "every name with an e in it somewhere".
ls *.txtEvery name ending .txtls s*Every name starting with sls notes/*Everything inside notesYour task
- ○List only the .txt files
- ○List everything starting with s
Open this level in your browser to type the commands at a live terminal that answers back.