Skip to content
zero2vibecodelearn vibe coding

What rm -rf does

rm -rf myfolder: Delete a folder and everything in it without asking — the most dangerous command there is.

The rm command page covers what it does in general, with an example.

rm-rfmyfolder
  • rm— command — delete files and folders
  • -rf— flags — -r: recursively (for folders); -f: don't complain if it isn't there
  • myfolder— argument: a file, a folder, or text

What it does when you run it

$ rm -rf myfolder
$ ls
a.txt  app.js  downloads  log.txt  names.txt  notes.txt  old.txt  projects  script.sh  todo.md

Run it yourself

The same files. Nothing here can break, and nothing leaves your browser.

Explain other commands

Written by Mikhail Kuzmitskii