Making & Removing Things
A free lesson from Swipe Coding · Ship It, level 1 · updated October 2026
By the Swipe team, founded by Colin · how we make lessons
Beyond navigating, you'll constantly need to create and clear away files and folders. mkdir ("make directory") creates a new folder. touch creates a new, empty file (its original purpose was updating a file's timestamp, but creating an empty file with it became the everyday habit). Both take the name of what you want to create as an argument — extra text typed right after the command.
$ mkdir my-project $ cd my-project $ touch index.js $ ls index.js
To delete things, rm ("remove") deletes a file, and rm -r ("recursive") deletes a folder along with everything inside it. This is the one command in this whole lesson to treat with real caution: unlike deleting through your file explorer, the terminal has no recycle bin or trash — rm deletes immediately and permanently.
$ rm old-notes.txt $ rm -r old-folder
Files deleted with rm in the terminal go to a recycle bin or trash folder, just like deleting them normally.
A few small letters after a command like this, written with a dash, are called flags (or options) — they change how the command behaves. -r on rm means "recursive: apply this to the folder and everything inside it". Most commands support several flags, and you can usually see them by adding --help after the command name, e.g. rm --help.
Running rm -r on a folder deletes it and everything inside it ____ — there is no recycle bin to recover it from.
What does the mkdir command do?
The Command Line
10 questions · pass with 60% — just like in the app.
What is the "shell" in the context of a terminal?
Git, package managers, and Expo are fundamentally command-line tools, even when they also offer a graphical app.
The command ____ prints the full path of the folder you are currently standing in.
Which command lists the files and folders inside your current directory?
cd .. moves you into the parent of the folder you are currently in.
Typing part of a folder name and pressing ____ will auto-complete it for you.
What does the mkdir command create?
Files deleted with rm can be recovered from a recycle bin, the same as deleting them normally.
Running rm ____ on a folder deletes it along with everything inside it.
What are extra letters after a command, written with a dash (like -r), called?
Keep your streak going in Swipe Coding
Swipe through every level of Ship It on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.
Get the Swipe apps →