I deleted "chmod
" by mistake using "sudo rm chmod
".
What is the way to recover the chmod
command?
Is it 'a no way to do it' operation?
I'm using Mac OS X Yosemite.
Asked
Active
Viewed 107 times
0
1 Answers
1
This question probably has all the answers for you. In short there is no easy way. Your options are:
- Recover the files from a (Time machin) Backup, if existent.
- Reinstall OSX, e.g. from the Recovery mode pressing Command+R at the startup screen
- Copy the missing files from the Recovery partition (check if the partition is up to date first). E.g. by doing
cp -a /bin /Volumes/<your disk name>
sudo
to copy it back to/bin/chmod
. And, in future, make sure you are paying attention when you're working as root. Removing a single binary is fairly innocuous compared with the damage you could have done. – Jonathan Leffler Jul 16 '15 at 06:24