Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-27-2013, 09:18 PM   #1
LQ Newbie
Registered: Mar 2010
Location: Evansville, IN
Distribution: Mandriva
Posts: 2

Rep: Reputation: 0
Lost contents of folder/file in alpine

I'm not a newbie but might as well be considering the blunder I just made. I accidentally deleted an email from an alpine folder in which I had saved all the emails between me and a correspondent. I realize this folder is actually a file, so what I really did was modify the file. I wanted to go back to the original, slightly longer file prior to it being modified by deleting that one email, so I searched for and found online instructions that I thought would do the job. Alas, in following those instructions I managed to somehow make all the contents of the file vanish. When I opened the file in alpine all I had was a blank screen. After a number of futile efforts at retrieving the data I gave up, deleted the file, and restored about half or two-thirds of the original file from a 2 year old tar backup. I've asked my correspondent to send me all of our correspondence subsequent to June 20, 2010, but I'm not sure he has it all or if it'll be in a form I can manipulate once I get it (i.e., header info). For that reason, and also for general curiosity, I'm still wondering if there's a way to retrieve the info, since it's still on my hard drive and has probably mostly not been overwritten yet. I have the inode number, which I got while following the previously mentioned instructions. I also saw, at some point, a screen that gave beginning and ending block numbers, or something of that sort, but I didn't write it down at that point and don't know if that sort of thing would be saved to a log file, what log file that would be, or if it would be in a human readable form. My questions are: 1) what can I do with that inode number, if anything, to retrieve the contents of the original file; 2) is there a place to look, and if necessary a way to read, a log file containing the contents of the screen mentioned above? Feel free to spell out the several things I've done wrong, in case I've missed anything in my recriminations, but please don't rub in the fact that I've been stupid. I already figured that out. Any help and/or educational tips will be appreciated.

Thanks in advance,
Old 02-28-2013, 07:26 AM   #2
Registered: May 2001
Posts: 29,359
Blog Entries: 55

Rep: Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546
Originally Posted by Drognib View Post
please don't rub in the fact that I've been stupid. I already figured that out.
I wouldn't call it stupid, I'd say you were unprepared. And with that you find yourself in the company of both new as well as seasoned Linux users. The difference is what you take away from the experience like finally deciding that making daily backups is a Good Thing...

The problem with deletion is that a lot of aspects work against you to deteriorate the situation and lessen chances of recovery: hardware, kernel, file system, anything that does write ops but most of all time. The best first reflex after deletion is to immediately remount the partition read-only or else immediately bring the machine down. The second reflex then should be to make a 'dd' copy of the partition to a file on a physically different partition or disk to ensure you have a backup. This backup then serves as "frozen", unalterable starting point. Without going into file system characteristics like secondary and tertiary indirect block allocation Mbox format is plain text meaning that you can easily do things in parallel like on the one hand have header / footer carvers like Photorec, Foremost, Scalpel or tools like extundelete search for text snippets and OTOH grep the image or use a hexeditor.
1 members found this post helpful.


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
Extracting the contents of a folder in a CPIO archive to another folder Refractor Linux - Software 4 07-10-2012 05:12 PM
File manager that read scripts that determine how to display a folder contents. pirriperdos Linux - Software 1 01-17-2012 02:48 AM
Scripts to list folder contents and copy images from folder and subfolders brunces Linux - Newbie 6 11-03-2011 01:23 PM
Script to Compare Folder Structures and File Contents rajaniyer123 Solaris / OpenSolaris 2 11-11-2008 01:31 PM
want to 'tar' a folder without some contents of folder shipon_97 Linux - Newbie 5 10-13-2007 04:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:12 PM.

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