Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some background to maybe help others from making this mistake.

I was reading jokes from this Stack Overflow page to my friend ( and I was going through them pretty quickly. Saw the one with Russian Roulette, and since I was talking to my friend I was distracted and didn't read the comments below it. I thought it was just going to say "Click" if you lost. Never even imagined someone would have put "rm -rf /" in there. Copied and pasted it into terminal, glanced over it quickly but somehow my eyes missed the delete command (you don't see what you're not looking for).

Anyway, as soon as I saw a scrolling list of files, I realized something was wrong and hit Ctrl+C. In other words, about 0.2 seconds later.

The last item it got to was:

rm: /Applications/ Permission denied

I assume that for most of these things you have to be root to delete, but it did take out Google Chrome. Luckily, it didn't get any of my user files.

So since I don't know what got lost, could someone tell me if "Applications" is the first directory in "/" on OS X or are there any directories that would have gotten wiped out before it? Anything important in Applications that is on OS X by default (that doesn't require root to delete)? Does rm remove things alphabetically?

Thanks for checking for me

(In case you're wondering, I only backup ~ since it's the only directory I keep my important files in.)

share|improve this question

closed as too localized by nerdwaller, Dave M, 8088, Renan, KronoS Apr 17 '13 at 17:25

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

... Oh, just ow. you did back up, didn't you? – Journeyman Geek Apr 17 '13 at 7:52
up vote 2 down vote accepted

Yes /Applications is the first directory. Just checked (bash shell) that the file expansion is alphabetic and it is so.

This similar command (not as painful but file expansion should be the same)-:

ls -1R /

Lists all the files in / then all the files in /Applications. So any files in / would have been clobbered before it started on files in /Applications. Listing follows. Hope that helps.

BBC iPlayer
DVD alias
eclipse 2
share|improve this answer
Thank you very much! – Nick Apr 19 '13 at 3:05

There's a very similar question in the context of a particular subdirectory (not /) on SuperUser (Can I list file names (or their parent directories) that were recently deleted using rm in OS X?) that's answered by using find to check modification dates.

find / -type d -mtime -1 > modified_folders.txt

However there's a much more thorough entry on AskDifferent.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .