who needs sbin anyway?

evildan

Super Moderator
So I mistakenly deleted the directory ~/sbin

Was that wrong? I was messing around and mistakenly overwrote the entire directory. Before I did this lovely mistake, I happened to grab the contents of the directory, but my obviously newbie question is, do I need it?

It doesn't exist on my other OSX machines, (is this a directory created with the developer tools?)

Can I replace this directory? If so, how?

Any help would be appreciated. ::evildan goes back to his corner to gloat::: :mad:
 
Did you delete /sbin or did you actually delete ~/sbin?

~/sbin would expand to /Users/username/sbin and so would just be an sbin directory in your home directory.

/sbin would be scarier to delete, for instance various bits of it are used during the boot process to mount directories, start up networking etc. If you deleted /sbin I'm amazed that you can boot :p
 
I think it has to be on your other box, it is just hidden try ls /sbin and see if something is there. Now for the bad news. From looking at my computer here I don't think you can even boot an OSX boot without an sbin directory. So put it back any way you can.

Traditionally sbin contained all of the binaries needed to get through the early boot process before all partitions were mounded and the network was up. Another interesting fact is that all of those binaries were traditionally statically linked since many of the shared libraries and possibly even the dynamic linker itself are on unmounted partitions.

Good Luck,
-Eric
 
no no no, I didn't delete /sbin...

I deleted ~/sbin (or /Users/userName/sbin)

And it wasn't a directory on another osx machine I looked at. Which is why I thought it was a developer thing, because the Developer tools are installed on my laptop and not the other osx machine I looked at.

I have restarted my laptop several times since I removed the mistakenly removed the directory, which brought about the question, do I need it?

:)
 
Well, in that case I don't even know what ~/sbin is. I thought maybe you typoed or just liked tildas :).

I have the developer tools installed on my box and I don't have an ~/sbin.

~/sbin wouldn't even be in your default path so I think you're pretty safe. Basically, anything under /Users is optional. Of course you might not be happy that you deleted your artwork, homework, source code or tax documents, but it's not essential to the operation of the computer.
 
Happy to hear that it was ~/sbin because you certainly would not have been able to boot had it been /sbin

You could have untarred something in your home directory that really wanted to be untarred in / and then created ~/sbin

-Eric
 
I can list the contents of the folder before it was mistakenly overwritten if that would help figure out why it was there in the first place.
 
After looking at the contents both /sbin and ~/sbin, I found that the contents were exactly the same.

So somehow a copy of /sbin was made in my home directory... which is a bid odd, since it wasn't visible.
 
Did you accidently make a copy of sbin in ~? That's really the only explanation I can come up with. I don't think it's terribly important though as long as your /sbin is all happy and intact.
 
yes, my guess is that I mistakenly copied /sbin into my home directory... My machine has been 100% free from errors, etc so I think I can assume deleting /users/myUserName/sbin was okay.

Thanks for all the help! :)
 
Back
Top