LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2008, 11:50 PM   #1
12346
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
Help! Accidentally bombed /usr/lib/


Geez. Not the time to make a mistake like this at midnight :P. Arrghh... now iceweasel is highlighting every word as mispelt.

Anyways, I accidentally rm -fr /usr/lib/'ed. It was actually an rm -fr * as root, but the cd command before it had a typo.

I'm really tired, but I don't want to shut down my computer yet.

I did keep a backup of the first 10 files in there, obviously no good because there were hundreds of files in there. I cp'd them in anyway. Is it safe to reboot? And most importanty, HOW CAN I RECOVER THESE FILES??
 
Old 03-21-2008, 12:03 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi, welcome to LQ!

Don't panic ;}

What distro are you using?



Cheers,
Tink
 
Old 03-21-2008, 12:09 AM   #3
12346
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Debian Lenny. Thanks for helping
 
Old 03-21-2008, 02:14 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And somewhat belated ... does your system hold on to
all the packages in /var/cache/apt/archives ? Is apt
and/or aptitude still working?
If you still have them a
cd /var/cache/apt/archives && dpkg -i *deb
should do the trick w/o too much hassle (of course
I'm no debian expert).


Cheers,
Tink
 
Old 03-21-2008, 06:33 PM   #5
12346
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Yeah, this kinda sucks. I just got rid of the cache to save disk space.

Here's what I'm thinking of doing (Downloading the .iso right now). Since I dual boot with Windows XP (in case anything like this happens), I'll make a new partition on my hard drive for a clean, new Lenny install. From there, I'll copy the .so's so that I can at least have the required basic .so's to boot into gui. From there, I can take care of that by a command I found:

"for pkg in `dpkg -l | grep ii | cut -f 3 -d " "`; do apt-get install --reinstall -y $pkg ;done"

I understand everything except the grep ii (Search for ii's in each line? I don't see any use in that..) and the cut. Would you explain how this works (Why ii needs to be in the line and the cut command)?

Keep in mind that I need to perform this first step, because I can't even access apt-get/aptitude because they require some .so. I remember that apt-get complained of a missing stdlibc6++ (something similar).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Accidentally bombed /usr/lib/ 12346 General 5 03-22-2008 05:14 AM
[SOLVED] No _sqlite3.so in /usr/lib/python2.5/lib-dynload rshepard Slackware 3 11-12-2007 02:59 PM
oops, I stripped /usr/lib and /usr/X11R6/lib ! H_TeXMeX_H Slackware 2 02-08-2007 09:27 PM
audacity unable to locate required lib files present in /usr/lib/ adityavpratap Slackware 4 11-30-2006 06:06 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration