rm'd dirs in ~/home/ reappear

Joined
May 24, 2009
Messages
11
Reaction score
0
Points
1
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? I am using OSX 10.6.6.
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
My guess is that because these folders are system needed folders, the system automatically makes them when it sees they are missing.
There really isn't a way to force OSX to not recreate these folders so the best way would be to make them invisible.
chflags hidden ~/Pictures
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
There is no need to use root privileges to delete folders in your home directory. You would be best to avoid executing commands with root privileges unless absolutely necessary.
 
OP
A
Joined
May 24, 2009
Messages
11
Reaction score
0
Points
1
@McYukon
In other words Apple is enforcing directories for their own purposes & software. It's my computer, I will do what I want.

@vansmith
I do most stuff via sudo but this action warranted use of root imo. Didn't want any question left in my mind that it has anything to do with users or privileges.

There has got to be a way to stop this behavior, even if it's editing cron or a config.

Edit:
Ah I guess it's futile. There's plenty of dot files in home dir anyways. I just wanted a barren place to put all my media. I'll just have to make a dir in home folder and put everything I want to store in there as I have done in the past. Will use the chflags for now.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top