LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-21-2008, 12:41 AM   #1
nofear3829
LQ Newbie
 
Registered: Jan 2008
Posts: 3

Rep: Reputation: 0
Unhappy deleted file recovery


ok so here the deal . . . i was messing around with amarok, music library program, and i accidentally deleted a folder that contained all my music, all 1100 of the perfectly organized and named files. ive tried severl data recovery programs, i.e. photorec, foremost, scalpel, and for whatever reason i cant seem to get them to work. im not even sure that i am making an iso of my hard disk right either, basically i'm frustrated and confused haha i'm a pretty new linux user so having to adjust to the command oriented terminal isnt helping either. please take nothing for granite when explaining sumthin to me lol if anybody could help or steer me in the right direction i would owe you a great deal, thanks a bunch
 
Old 02-21-2008, 03:04 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Well first of all you shouldn't probably turn off your compuer, nor write anything onto the partition where the deleted data is. It depends on a few things, but if you happen to overwrite on the areas where the "deleted" files are, they're unrecoverable after that.

The easiest start probably is to use the (graphical, most of the time) recovery programs available on the net; some of them are free of charge, some not, and most of those that are "free to try" don't actually recover anything unless you buy the full product, but at least they should show you if they can find the "deleted" files. With luck you might find a program that can bring them back, but I wouldn't count on it..the primary way to prevent data loss is making backups of your important data, and if you don't happen to have backups, it usually means either you don't consider your data important or then you're just pushing your luck for fun

Making an image of the partition shouldn't be difficult, but it's going to be as big as the partition is (free space doesn't matter; it's imaged as well), so make sure you've got enough space. With dd, for example, the command would be
Code:
dd if=/dev/sda2 /media/storage/image_file
which would make an image from your primary (a) harddisks's (sd on newer distributions; on older ones IDE disks are hd, not sd) second partition (2) and store it to /media/storage/ directory under the name "image_file". To make the partition naming more clear, here's how it goes: on old systems IDE disks are hda, hdb and so on, and scsi things sda, sdb and so on. On newer distributions all harddisks should be just sda, sdb, ... (so the 'hd' naming for IDE disks would be dropped off). See which ones you got. The letter tells if the drive is primary (sda) or secondary (sdb) and so on, and the number at the end which partition it is, counting from 1 (first partition) on - third partition of primary disk would be sda3 while first partition of secondary disk would be sdb1. So once you've figured out your partition device file name, just dd it if you want. It takes time if the partition is big.

If you've got the original media where you got the music from, then you have an easy solution: just automate re-ripping the discs, and you're done in a few days or so, or less depending on how intensively you do it. A simple script handles it in one command, and all you got to do is change discs and re-run the script (whicn in turn runs the ripping and encoding programs). And if you don't have the original media (read: you downloaded the music illegally), then you don't need to get the files back, because that wouldn't be legal. Or if you downloaded them from a web store, either they have some sort of "warranty" for cases like this and you can re-download, or then it's stated in the rules that it's your loss if you didn't backup.

I'd say that if the various file recovery programs on the net (a web search gives you a zillion of them, try those that are highest rated - they are for Linux too) don't do the job, your next best option is to just re-rip the original media. You could take the disk to a commercial recovery firm and they would probably do the thing, but it's got two drawbacks: if the content is illegal, you wouldn't maybe want to show it to them, and on the other hand it costs a lot of money. Well, if the data is important then money is no problem (if it was, you had backups because it's cheaper, right?).

So - bring the original media in and start ripping and encoding if you necessarily want the audio to be on your harddisk, next time remember to make backups once in a while to prevent this sort of stuff from happening, and learn from this (and in case the music was pirated, I'm not even sorry for you losing it).
 
  


Reply

Tags
data, recovery



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
recovery of deleted files linux4real Linux - Newbie 7 06-29-2006 08:14 AM
recovery of deleted files linux4real Linux - Software 3 06-27-2006 01:13 PM
recovery of deleted files linux4real Linux - General 1 06-27-2006 09:32 AM
data recovery (deleted by rm -R) lavluda Debian 9 02-16-2006 04:02 AM
recovery files deleted in Linux Nandex Linux - Software 8 02-14-2004 04:22 PM

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

All times are GMT -5. The time now is 07:32 PM.

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