LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2008, 02:15 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
help on recovery software


hi
i have mistakenly deleted some of the files and folders in the /usr folder.
is there any recovery software for the data recovery.
 
Old 02-07-2008, 04:36 AM   #2
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
Have you looked in the .Trash folder in your home directory?

If you deleted it with rm, there is a way to get it back I think, but it's rather ugly.
 
Old 02-07-2008, 05:12 AM   #3
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
hi
yes i have deleted with rm -Rf .
some part of share directory(/usr/share) is deleted .how to recover it.
 
Old 02-07-2008, 05:32 AM   #4
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
I have looked it up. I thought I once used some OSS to recover files from ntfs, but I couldn't find it. There are a couple of proprietary software solutions out there - but you have to pay. If it's really important for you to recover it - do not use the drive until you have the recovery software. Once it gets overwritten, it's over.
If you have anything important at all on your system drive, make regular incremental backups.
 
Old 02-07-2008, 06:28 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Quote:
Originally Posted by babu198649 View Post
some part of share directory(/usr/share) is deleted .
Files in /usr are related to the system and therefore part of packages (please fill in your profile with distro info). In the end it may be cheaper (as in time is money) to have your distro's package manager verify installed packages (or review your ~/.bash_history for the paths in 'rm' commands given, find the corresponding packages and) reinstall those.
 
Old 02-07-2008, 07:56 AM   #6
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
hi thank u for u r replys

my disto is

[root@localhost babu]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 2)


when i started deleting(accidently) within 10 secs i have stopped the deletion and some of the deleted message is

removed `usr//share/locale/ru/LC_MESSAGES/evolution-2.0.mo'
removed `usr//share/locale/ru/LC_MESSAGES/knotes.mo'
removed `usr//share/locale/ru/LC_MESSAGES/kabcformat_binary.mo'
removed `usr//share/locale/ru/LC_MESSAGES/kdeprint_part.mo'
removed `usr//share/locale/ru/LC_MESSAGES/kcmmidi.mo'
removed `usr//share/locale/ru/LC_MESSAGES/kdbg.mo'
removed `usr//share/locale/ru/LC_MESSAGES/ffrs.mo'
removed `usr//share/locale/ru/LC_MESSAGES/kwin_b2_config.mo'


...........

removed `usr//share/locale/nb/LC_MESSAGES/libkickermenu_recentdocs.mo'

stopped(CTRL+C)


now i am unable to start the computer and work in gnome(desktop). i am using terminal 1(CTRL+ALT+F1) .

when i start the system i get error message

can't open file /usr/share/gdm/themes/Default/Default.xml .


is it possible to recover the deleted data.
 
Old 02-07-2008, 09:17 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Top of my head should go something like this.
Verify installation, chunk process in case it's a long list: 'rpm -Va 2>&1|grep missing|awk '{print $NF}'|tee /tmp/missing.log'
See what packages the files belong to: 'uniq /tmp/missing.log|xargs -iX rpm -q --whatprovides 'X'|tee /tmp/packages.log'
Now /tmp/packages.log contains the list with packages to refresh. Two ways to go about it: install same version or unpack and replace. Installing (preferred option) may require use of --force but it also syncs the RPMDB which means integrity complete. Unpacking using rpm2cpio means replacing files on filesystem w/o using RPMDB, IOW a hack, not SOP.
 
Old 02-08-2008, 09:06 AM   #8
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
thank u unSpawn
the idea is great.
i have executed the command
rpm -Va 2>&1|grep missing|awk '{print $NF}'|tee /tmp/missing.log
it took around 5 min to complete.

and the next command
uniq /tmp/missing.log|xargs -iX rpm -q --whatprovides 'X'|tee /tmp/packages.log

i have executed it 4 hours back and its still running

the second command uses the file written by the first.
and its taking more time than the first , have i done any thing wrong.
 
Old 02-08-2008, 09:04 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
It uses 'tee' to log to screen and file simultaneously so if there's nothing scrolling by since the last time you checked it's about done I'd say.
 
  


Reply


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
Data Recovery Software linuxtreo LinuxQuestions.org Member Intro 1 05-29-2007 05:43 AM
LXer: Linux Data Recovery on Windows - Is possible through Disk Doctors Linux Recovery Software LXer Syndicated Linux News 0 10-22-2006 01:21 PM
Software RAID 10: recovery hamish Linux - Software 1 10-27-2005 02:36 PM
Data Recovery Software stabile007 General 1 08-18-2004 05:13 PM
Raid software recovery Iced Earth Linux - Software 0 08-12-2003 08:16 AM


All times are GMT -5. The time now is 02:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration