Retrieve Deleted Mac 10.4.8 /usr/bin Directory

  • Thread starter 0rthodontist
  • Start date
  • Tags
    Mac
In summary: If not, then you may need to seek help from someone that uses macs. If you used sudo, then you may need to find a program to undelete the directory.
  • #1
0rthodontist
Science Advisor
1,231
0
Through an incrediby boneheaded mistake, I have deleted my /usr/bin directory on my MacBook. Fortunately it only had a small number of programs that weren't there by default. Also, most of the GUI seems to run just fine without the bin directory, and the computer boots. But I do not know how to recover the directory. My best guess at this point is to solicit people I know who use macs to give me their /usr/bin directories. Worst case, I could reinstall the whole OS. But before I try that, is there any other way that I can get this directory?
 
Computer science news on Phys.org
  • #2
If you have enough disk space, or a spare disk, you can create a new partition and install a fresh copy of the OS onto it, then try to copy /usr/bin from it. But watch out for links! An ls -l on mine shows a bunch of symlinks which you'd probably have to recreate by hand. And then you'd have to figure out if there are any hard links, and what they link to, and recreate those, too.
 
  • #3
I think your best bet may be to try and ether partition your drive, or find an external drive and do a fresh system install, and see if you can salvage that /usr/bin you can maybe then se a program such as OnyX to rebuild the system links. I'd be happy to assist you in anyway, the ls command form my /usr bin yields a list of files much too long to post here, otherwise i'd show you what mine contains. But if you need me to try and copy mine, i'd be happy to help, I have a macbook with OS X.4.8
 
  • #4
Well, thanks for the offer/information, but I ended up just reinstalling the operating system. It was a nuisance but it's back to normal.
 
  • #5
As they say.. don't use the superuser account :wink:

You didnt sudo delete that dir did you?
 

Related to Retrieve Deleted Mac 10.4.8 /usr/bin Directory

1. How can I retrieve a deleted /usr/bin directory on Mac 10.4.8?

If you have a Time Machine backup, you can use it to restore the deleted directory. Simply open Time Machine, navigate to the date when the directory was still present, and select the /usr/bin directory to restore it. If you don't have a backup, you can try using a data recovery software, but there is no guarantee that it will be successful.

2. Can I retrieve a specific file from the deleted /usr/bin directory?

If you have a Time Machine backup, you can use it to restore the specific file from the deleted /usr/bin directory. Open Time Machine, navigate to the date when the directory was still present, and select the file to restore it. If you don't have a backup, you can try using a data recovery software, but it may not be able to recover individual files.

3. Will retrieving a deleted /usr/bin directory affect my other files?

No, retrieving a deleted /usr/bin directory will not affect your other files. The directory contains important system files, but restoring it will not cause any harm to your other files. However, it is always recommended to have a backup of your important files to avoid any potential risks.

4. What are the reasons for a /usr/bin directory to be deleted on Mac 10.4.8?

The most common reason for a /usr/bin directory to be deleted on Mac 10.4.8 is accidental deletion by the user. It can also happen due to a malware or virus attack, system errors, or corruption of the directory. It is important to regularly backup your files to avoid the risk of losing important directories and files.

5. Can I prevent the /usr/bin directory from being deleted in the future?

Yes, you can prevent the /usr/bin directory from being accidentally deleted in the future by setting it as a protected system file. To do this, open the Terminal and enter the command "sudo chflags schg /usr/bin". This will make the directory immutable, meaning it cannot be modified or deleted. However, this should be done with caution as it may cause some system functions to not work properly.

Similar threads

Replies
2
Views
2K
  • Programming and Computer Science
Replies
1
Views
3K
  • Computing and Technology
Replies
16
Views
85K
  • Programming and Computer Science
Replies
1
Views
3K
  • Computing and Technology
Replies
5
Views
9K
  • Programming and Computer Science
Replies
4
Views
8K
  • Computing and Technology
4
Replies
123
Views
16K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Replies
2
Views
5K
  • Programming and Computer Science
Replies
5
Views
3K
Back
Top