Windows PowerShell (practice mode: nothing here touches your real computer)
Lesson 9: Look around (dir and ls)
Level 2, Talk to Your Computer: PowerShell. List a folder, read the Mode column, peek without moving. The new word: Mode column. It follows lesson 8, Where am I? (pwd). Next comes lesson 10, Walk around (cd).
What the lesson explains
Look around. In the explorer you see. In the terminal you ask.
d means a folder. A dash means a file. On the card: d---- images
What you do first
Peek without moving. In the practice terminal, type ls images at the prompt PS C:\Users\you\Documents\my-project> and the computer answers: Directory: C:\Users\you\Documents\my-project\images / Mode Name / ---- ---- / -a--- cat.png.
The files on the practice computer
This lesson works in 2 folders. At the start, Documents holds music\, my-project\, stories\; Documents\my-project holds images\, hello.py, notes.txt.
You change nothing here, so lesson 10 finds the same files.
What you practise
Try it, "Peek without moving": In the practice terminal, type ls images at the prompt PS C:\Users\you\Documents\my-project> and the computer answers: Directory: C:\Users\you\Documents\my-project\images / Mode Name / ---- ---- / -a--- cat.png.
In your head, "Folder or file?": Which line is a folder? The answer: "d---- music".
Mini practice, "Look in two places": In the practice terminal, type dir at the prompt PS C:\Users\you\Documents> and the computer answers: Directory: C:\Users\you\Documents / Mode Name / ---- ---- / d---- music / d---- my-project / d---- stories. Then: In the practice terminal, type ls stories at the prompt PS C:\Users\you\Documents> and the computer answers: Directory: C:\Users\you\Documents\stories / Mode Name / ---- ---- / -a--- story.txt.
What PlayBuddy and PlayType say
PlayBuddy: "In the explorer you see everything. In the terminal, you ask."
PlayType: "Look at the first letter. The letter d means a folder. A little dash means a file."
Help in every lesson
Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.
A green ring shows where to click the first time. After that you do it on your own, and if you slip twice the ring comes back.
Stars
The lesson has 4 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.
About DayOneCode
DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.