Technology

The one command you must by no means let Claude Code or Codex run

Different AI slipups may be devastating, and should you cruise across the Claude, ChatGPT, or Gemini subreddits lengthy sufficient, you’ll discover tales of woe like this one, usually brought on by a easy however very highly effective command:

rm -rf

That little command strikes concern — or at the least, it ought to strike concern — into the center of any Linux consumer. And should you’re utilizing Claude Code or Codex for vibe coding, make no mistake: You’re a Linux consumer.

Welcome to a different version of Immediate Mode, your weekly AI e-newsletter.

I’m your host, Ben Patterson. Every week on Immediate Mode, I’ll be serving up evaluation of the AI developments that matter to on a regular basis customers such as you and me. Keep tuned for sensible AI ideas, hands-on experiences with the most recent AI instruments, and–you guessed it–prompts that can assist you get essentially the most out of your AI assistants.

Thanks for studying, and should you like what you see, simply enroll proper right here.

The “rm” stands for “take away,” the usual Linux command for deleting a file. By itself, “rm” can solely accomplish that a lot injury, however when mixed with the “-r” (for “recursive”) and “-f” (for “pressure”) arguments, “rm -rf” can lay waste to a tough drive, nuking a listing, its information, and its subdirectories in seconds.

What makes “rm -rf” actually scary is whenever you – or Claude – use it wherever within the neighborhood of your own home listing, as in:
“rm -rf /Customers/benpatt/deleteme” 

That command ought to simply wipe the “deleteme” subdirectory in my (instance) dwelling listing, however had been I to unintentionally pass over the “/delememe” half, growth! All my dwelling information and folders, gone perpetually. 

A fair scarier model of the command is: