Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions
User Name
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.


  Search this Thread
Old 12-21-2006, 01:01 AM   #1
LQ Newbie
Registered: Dec 2006
Distribution: RHEL4
Posts: 3

Rep: Reputation: 0
How to recover file if it's deleted accidentally?

I have my file deleted accidentally. So, everytime I type-in any command in the shell prompt, it always returns segmentation fault.

Anyone know how to recover this file? Appreciate for all your help.

Old 12-21-2006, 06:53 AM   #2
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Hello and welcome to LQ, hope you like it here.
Please fill in your user profile so we know which distro you use.

There is no way to safely recover a complete file for usage on journalling filesystems. Easiest way would be to reinstall the package. Else check your package manager to see which version you need and download then extract the file. You're looking for Glibc.
Old 12-23-2006, 09:25 PM   #3
Registered: May 2003
Location: lake michigan
Distribution: Debian, Mint, Slackware
Posts: 457

Rep: Reputation: 35
yes, you would probably have to reinstall it again and run the command ldconf or ldconfig (cant recall which).
Old 12-25-2006, 08:56 PM   #4
LQ Newbie
Registered: Dec 2006
Distribution: RHEL4
Posts: 3

Original Poster
Rep: Reputation: 0

I am using RHEL4.

I found that the file is actually not deleted but the symbolic link for has been modified. I tried to run 'ln' command but it shows 'Segmentation Fault'. Other commands also generates segmentation fault.

Any idea how to put back the correct symbolic link?

Old 12-25-2006, 09:13 PM   #5
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
First find the exact glibc rpm package that was installed:
rpm -q --info glibc. If you are running the 64 bit version, then you may need a glibc-32bit package instead.

Since glibc is already installed, you can force install it. "sudo rpm -I --force glibc-<version>.rpm"

If one link was deleted, maybe more of them where.

There is an rpm command option (-V) to verify packages which can tell you if you are missing files.
rpm -V glibc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I recover a deleted file in Linux ? josedsilva Linux - General 9 01-05-2010 08:49 AM
Accidentally deleted file... emalbum Linux - Kernel 1 09-03-2006 11:14 AM
I have deleted a file thru rm can i recover it ricka343 Linux - General 2 06-27-2006 04:28 AM
How to recover deleted file v1nc3nt Linux - Newbie 5 05-23-2006 04:28 AM
Help needed to recover data from ext3 file system where mkfs was issued accidentally kapilsampath Linux - General 4 04-26-2005 08:52 AM > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 01:52 AM.

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