Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jariev202

macrumors newbie
Original poster
May 6, 2005
7
0
Accidentally I deleted the file /bin/ls :( !!!!!!

I'm using osx 10.4.2

Anyone knows how I may recover it?

Thanks!
 
ChrisBrightwell said:
Here's a question ... how did you delete /bin/ls?

For me to put symlink in /bin, I had to sudo it.
He was probably logged in as root.

The ability to delete the very commands that are used to control the computer - a great idea, that. I anxiously await this feature in the next generation of nuclear reactor control panels.
 
If you are the kind of person that goes around deleting stuff like ls maybe you want to put

alias rm='rm -i'
alias mv='mv -i'

in ~/.profile
 
I was not logged as root. I know that's really dangerous. I was doing some configurations and had to copy one file to /bin but without wanted it I did a copy to /bin/ls, not to /bin so i rewrited ls with my file :(

This important system commands should be part of the kernel so we may not delete them!

Thanks again from helping me, something like this may arrive to everybody

:cool:
 
I don't understand why is everyone so eager to take flexibility away... that's what makes UNIX so good! If you want to make sure you won't accidentally erase some file, just set the appropiate permissions (and all those really important files are owned by the root; if you managed to overwrite ls without being root, then the permissions were wrong).
 
jariev202 said:
I was doing some configurations and had to copy one file to /bin but without wanted it I did a copy to /bin/ls, not to /bin

better add

alias cp='cp -i'

or maybe cp -n

to my list above then ;)

jariev202 said:
This important system commands should be part of the kernel so we may not delete them!

That's not what a kernel is. This is mistake made by an inexperienced user nothing more. Maybe Apple should make the aliases part of your .profile by default, but I guess they think if you need to open the terminal you know how to use it?

All you needed to do to fix this yourself was to reinstall BaseSystem.pkg.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.