Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Possible Duplicate:
Stop Mac OS from re-creating ~/Pictures, ~/Music, or ~/Public

Hi, I su'd to root and deleted some stock directories in my home folder such as Documents, Music, Pictures via rm -Rf. They were indeed deleted, but the next time I went to my home folder in Finder, the folders were re-created. How do I stop this behavior? I am using Snow Leopard (OSX 10.6.6).

share|improve this question

marked as duplicate by Daniel Beck, random Jan 14 '11 at 15:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You can't. They'll just keep being recreated. Maybe by taking away your own file system permissions, but you definitely don't want that.

Try setting the hidden flag to make them invisible, that's the best you can get.

chflags hidden ~/Movies
share|improve this answer
chflags hidden is what I am doing already. There has got to be a way to do this. What replaces the directories? Must be a daemon of some kind, and launchd must be launching it. I wonder if a change would affect the repopulation of dirs globally or by user. – adamlogan Jan 13 '11 at 21:51
@adamlogan You could try using dtrace, or fs_usage or something like that to determine which process is responsible, and try blocking that. – Daniel Beck Jan 14 '11 at 12:58
@adam I'm currently running dtrace to log file accesses, and a folder action for visible feedback once ~ is modified. No luck so far. – Daniel Beck Jan 14 '11 at 14:07
@adam Music was just created when QuickLooking an audio file, either by the process quicklookd or Finder itself. Do you see a way to prevent this? I don't. – Daniel Beck Jan 15 '11 at 1:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.