Author Topic: (Solved) I deleted a text by mistake  (Read 1260 times)

Offline OrdiDoc

  • Hero Member
  • *****
  • Posts: 616
(Solved) I deleted a text by mistake
« on: May 29, 2010, 03:29:12 PM »
I guess that i'll have to rewrite the text but if i use Delete and i delete something it's not in the Trash but is there a way that i can undo that  ::)
« Last Edit: May 30, 2010, 12:45:45 AM by OrdiDoc »

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: I deleted a text by mistake
« Reply #1 on: May 29, 2010, 04:14:46 PM »
If it was a document, it should be in the trash, but even if not, someone might be able to help, it's beyond me.

If it was a document you were editing it is possible you can get back to the last save point.   The editor may have saved it as doc.~ or doc.old if it was configured to do that.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: I deleted a text by mistake
« Reply #2 on: May 29, 2010, 04:19:47 PM »
if you accidentally deleted a file and it is not in the trash can you can recover the file by using photorec, if you don't have it installed on your system you can find it on synaptic

it is a cli tool, you can call it by opening konsole and writing photorec

very easy to use but you will have to be patient and set it to only search for the file you lost, otherwise it will find too much files

the problem with this tool is that it doesn't recover the name of the file but it will recover the file and you can open it and see if it is what you are looking for

"If it was a document you were editing it is possible you can get back to the last save point.   The editor may have saved it as doc.~ or doc.old if it was configured to do that."

this only happens when openoffice crashes and can recover the file
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: I deleted a text by mistake
« Reply #3 on: May 29, 2010, 04:23:29 PM »
nano saves .old  :)  It depends on the tool.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline OrdiDoc

  • Hero Member
  • *****
  • Posts: 616
Re: I deleted a text by mistake
« Reply #4 on: May 29, 2010, 04:52:26 PM »
Great, i hope that i can recover it, i'll let you know if it's working...thanks again for your help

Offline OrdiDoc

  • Hero Member
  • *****
  • Posts: 616
Re: I deleted a text by mistake
« Reply #5 on: May 29, 2010, 04:57:44 PM »
This is what i have using Konsole and Photorec

PhotoRec 6.11, Data Recovery Utility, April 2009                                                             
Christophe GRENIER <grenier@cgsecurity.org>                                                                 
http://www.cgsecurity.org                                                                                   
                                                                                                             
  PhotoRec is free software, and                                                                             
comes with ABSOLUTELY NO WARRANTY.                                                                           
                                                                                                             
No harddisk found                                                                                           
You need to be root to use PhotoRec. 

I'm i missing something ?

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: I deleted a text by mistake
« Reply #6 on: May 29, 2010, 05:04:39 PM »
Were you root?
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline OrdiDoc

  • Hero Member
  • *****
  • Posts: 616
Re: I deleted a text by mistake
« Reply #7 on: May 29, 2010, 05:08:29 PM »
Don't think so but i tried root terminal and it doesn't open or do anything.... ???

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: I deleted a text by mistake
« Reply #8 on: May 29, 2010, 05:13:33 PM »
I dunno.  T6?
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline OrdiDoc

  • Hero Member
  • *****
  • Posts: 616
Re: I deleted a text by mistake
« Reply #9 on: May 29, 2010, 05:15:51 PM »
I finally rewrote the text but the process of using photorec is interesting so if i can make it work it will be useful :)

Something new, i went back to More Applications and got to Terminals, then Super user mode and i have photorec showing me this now:

PhotoRec 6.11, Data Recovery Utility, April 2009                               
Christophe GRENIER <grenier@cgsecurity.org>                                     
http://www.cgsecurity.org                                                       
                                                                               
                                                                               
Disk /dev/sda - 320 GB / 298 GiB (RO) - ATA WDC WD3200BEVT-2                   
                                                                               
Please select the partition table type, press Enter when done.                 
[Intel  ]  Intel/PC partition                                                   
[EFI GPT]  EFI GPT partition map (Mac i386, some x86_64...)                     
[Mac    ]  Apple partition map                                                 
[None   ]  Non partitioned media                                               
[Sun    ]  Sun Solaris partition                                               
[XBox   ]  XBox partition                                                       
[Return ]  Return to disk selection                                             
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
Note: Do NOT select 'None' for media with only a single partition. It's very   
rare for a drive to be 'Non-partitioned'.                                       
                                               
It's getting really interesting, now i have more choices that i don't know what to do with, i just love it  ;D ;D ;D
« Last Edit: May 29, 2010, 05:19:10 PM by OrdiDoc »

Offline OrdiDoc

  • Hero Member
  • *****
  • Posts: 616
Re: I deleted a text by mistake
« Reply #10 on: May 29, 2010, 05:20:54 PM »
I'm having fun here,now after pressing Enter again i have this:

PhotoRec 6.11, Data Recovery Utility, April 2009                               
Christophe GRENIER <grenier@cgsecurity.org>                                     
http://www.cgsecurity.org                                                       
                                                                               
Disk /dev/sda - 320 GB / 298 GiB (RO) - ATA WDC WD3200BEVT-2                   
                                                                               
     Partition                  Start        End    Size in sectors             
     No partition             0   0  1 38913  80 63  625142448 [Whole disk]     
 1 * HPFS - NTFS              0  32 33  6374 254 63  102412327                 
 2 E extended LBA          6375   0  1 38912 254 63  522722970                 
 5 L HPFS - NTFS           6375   1  1 12749 254 63  102414312 [Seven]         
   X extended             12750   0  1 36464 254 63  380981475                 
 6 L HPFS - NTFS          12750   1  1 36464 254 63  380981412 [Data]           
   X extended             36465   0  1 37741 254 63   20515005                 
 7 L Linux                36465   1  1 37741 254 63   20514942                 
   X extended             37742   0  1 37881 254 63    2249100                 
 8 L Linux Swap           37742   1  1 37881 254 63    2249037                 
   X extended             37882   0  1 38912 254 63   16563015                 
 9 L Linux                37882   1  1 38912 254 63   16562952                 
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
[ Search ]  [Options ]  [File Opt]  [  Quit  ]                                 
                              Start file recovery 

So i guess now that i have to choose File Opt ?

Online macuira

  • Full Member
  • ***
  • Posts: 130
  • every bullet is lost
Re: I deleted a text by mistake
« Reply #11 on: May 29, 2010, 05:26:59 PM »
please go first to this page http://www.cgsecurity.org/ and read the step by step tutorial, is very informative, saves headaches also

Offline j-retired

  • Hero Member
  • *****
  • Posts: 983
  • To find out what 'busy' is, then try retiring!
Re: I deleted a text by mistake
« Reply #12 on: May 29, 2010, 05:28:25 PM »
Bitter experience taught me that if I was working on something large, I should save "way stations" frequently, eg, xxxxxv1, xxxxv2 etc, so that when I did something utterly stupid (or the cat walked over the keyboard, as she is wont to do) I could go back to something sensible.

A friend of mine ridiculed this till the time, at 3.00 AM when he, naturally a tad tired then, moved some reference books across the keyboard... and.... turned the air blue for several minutes without a repeat! Not being very good on computers, he lost the lot.

I know this doesn't help get your work back now, but you're not the first to suffer, and surely won't be the last!

 :D

j

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: I deleted a text by mistake
« Reply #13 on: May 29, 2010, 06:40:55 PM »
well, since you seem to have deleted a file, this is what we are looking for

what file is it?

what app created it, is it a odf, a jpeg, a doc, a mp3?

open konsole, write su and then enter, write you root password and enter

then write photorec and enter
maximize the window of photorec, the smaller window of konsole is not enough for this app

once you are there, select the hard disk that contains the partition you used to store the file and press enter

on that list select intel/pc and enter

then a list of the logical partitions on that disk will be showed, press up or down arrow keys to select the partition that contained the file, if you have /home partition, select it, you can distinguish it for he size, here you won't see the name

if you don't have a /home partition, then select the / partition

in the lower section of the screen you can see 4 options

search, options, file opt and quit, by moving the left and right keys on the keyboard select file options and press enter

a long list of filetypes will be listed, press spacebar to select which ones you want to search or which ones doesn't

press up or down and when finished press enter, be sure to select the search option with the right partition selected

then it will ask the type of partition it is, it is probably a ext3 or ext4 so select that

the next question will be where to put the files that it will recover

ideally you shouldn't use the same partition you have the file you want to recover to store the files it will find on the search process, also you should have enough space, around 20 gbs, sometimes it finds too many things

press y once you have selected where the files will be stored, the process will start immediately and will show how many files and the type of the files, it will also show a estimated time to complete the task

when finished the task open the folder you selected to store the recovered files and see if it found the right file

if not verify that you selected the right type of files to search but don't let it search for every file, you will find too many files, 20000 or more, be very selective

good luck finding the file
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline OrdiDoc

  • Hero Member
  • *****
  • Posts: 616
Re: I deleted a text by mistake
« Reply #14 on: May 30, 2010, 12:32:32 AM »
The file is a doc file, i will read the tutorial but T6 this is great, thanks for that  ;)