# I lost /bin

**URL:** <https://www.ruby-forum.com/t/i-lost-bin/138354>\
**Category:** Ruby\
**Created:** [May 22, 2008, 8:09am UTC](https://www.ruby-forum.com/t/i-lost-bin/138354 "2008-05-22T08:09:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 22, 2008, 8:09am UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/1 "2008-05-22T08:09:14Z")

</div>

I was compiling the ‘fxruby’ gem…

I was doing everything ‘sudo’, and I was messing with its Makefile  
(because it didn’t compile cleanly),

ANYWAY,

the ‘fxruby’ gem is now installed succesfully.

The bad news is that somehow my ‘/bin’ folder got deleted.

If anybody here is using _Ubuntu_ and is willing to do ‘ls /bin’ and  
paste the results to [http://pastebin.com/](http://pastebin.com/), so I see what I need to  
restore, I’ll be extremely thankful!

---

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 22, 2008, 8:26am UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/2 "2008-05-22T08:26:41Z")

</div>

Albert S. wrote:

> The bad news is that somehow my ‘/bin’ folder got deleted.
> 
> If anybody here is using _Ubuntu_ and is willing to do ‘ls /bin’ and  
> paste the results to [http://pastebin.com/](http://pastebin.com/), so I see what I need to  
> restore, I’ll be extremely thankful!

[http://pastebin.com/m6c9a3f7](http://pastebin.com/m6c9a3f7)

---

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 22, 2008, 8:36am UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/3 "2008-05-22T08:36:04Z")

</div>

Albert - you are probably going to encounter unrecoverable damage if  
you have lost /bin. Even the default shell for root (/bin/sh) is in  
the directory that you lost.

---

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 22, 2008, 8:47am UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/4 "2008-05-22T08:47:14Z")

</div>

Gregg Kang wrote:

> Albert - you are probably going to encounter unrecoverable damage if  
> you have lost /bin. Even the default shell for root (/bin/sh) is in  
> the directory that you lost.

Maybe he can boot from an ubuntu cd and copy stuff over.

Hey, first time I’ve ever used pastebin, and it was to paste bin. I feel  
special.

---

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 22, 2008, 11:05am UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/5 "2008-05-22T11:05:53Z")

</div>

YEEEEEEEEEEEHHHHHHAAAAAAA!!!

I did it! I’m back! 🙂

Joel, thanks! (I couldn’t find my ubuntu cd.)

Gregg Kang

> Albert - you are probably going to encounter unrecoverable damage if  
> you have lost /bin. Even the default shell for root (/bin/sh) is in  
> the directory that you lost.

I lost ‘cp’ and ‘rm’ too. Fortunately for me, I had gazillions of  
terminals open with Midnight Commander. I copied the most basic commands  
from an old Fedora partition that was mounted (it’s always mounted, so I  
didn’t have to have ‘mount’). Its ‘bash’ didn’t work on my ubuntu (it  
was compiled against termcap), so I logged in to where my website is  
hosted, becuase it uses Debian, and taken ‘bash’ (which serves as ‘sh’  
too) from there.

I restored enough commands so that my ‘apt-get’ worked again.

Then, to find out all the packages that had files installed in /bin/ I  
did “dpkg -S ‘/bin/\*’”. I reinstalled them all with “sudo apt-get -y  
–reinstall install …”.

That’s all. My system even survived a reboot!

It was so invigorating an experience! So empowering! I recommend  
deleting your /bin once in a while (or, alternatively, installing  
‘fxruby’) for sport.

> first time I’ve ever used pastebin, and it was to paste bin

LOL!

---

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 22, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/6 "2008-05-22T20:05:32Z")

</div>

On May 22, 10:05 am, Albert S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> YEEEEEEEEEEEHHHHHHAAAAAAA!!!
> 
> I did it! I’m back! 🙂  
> […]  
> I lost ‘cp’ and ‘rm’ too. Fortunately for me, I had gazillions of  
> terminals open with Midnight Commander. I copied the most basic commands  
> from an old Fedora partition that was mounted (it’s always mounted, so I  
> didn’t have to have ‘mount’). Its ‘bash’ didn’t work on my ubuntu (it  
> was compiled against termcap), so I logged in to where my website is  
> hosted, becuase it uses Debian, and taken ‘bash’ (which serves as ‘sh’  
> too) from there.

Now that you have successfully recovered is the time to read this  
classic:  
[http://groups.google.com/group/comp.dcom.telecom/msg/b0f6e6d80da01121](http://groups.google.com/group/comp.dcom.telecom/msg/b0f6e6d80da01121)

Vidar

---

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 22, 2008, 9:18pm UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/7 "2008-05-22T21:18:54Z")

</div>

This taught you 😉

Always keep copies of the fundamental commands to restore a f\*cked up  
system!

---

<div class="post-metadata">

**Author:** ![alby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@alby](https://www.ruby-forum.com/u/alby)\
**Post date:** [May 23, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/i-lost-bin/138354/8 "2008-05-23T20:18:10Z")

</div>

On Thu, May 22, 2008 at 8:46 AM, Joel VanderWerf  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Gregg Kang wrote:
> 
> > Albert - you are probably going to encounter unrecoverable damage if  
> > you have lost /bin. Even the default shell for root (/bin/sh) is in  
> > the directory that you lost.
> 
> Maybe he can boot from an ubuntu cd and copy stuff over.
> 
> Hey, first time I’ve ever used pastebin, and it was to paste bin. I feel  
> special.  
> I need I site call pinoint to say how you did that well;)  
> BTW you are special, I am special, we all are special, ahem …
> 
> –  
> vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

–  
[http://ruby-smalltalk.blogspot.com/](http://ruby-smalltalk.blogspot.com/)

* * *

Whereof one cannot speak, thereof one must be silent.  
Ludwig Wittgenstein
