Top of file gone missing, can it be recovered?

Hi all,
I had a file open in BBEdit Lite 6.1 for OS X and found that several pages off the top were missing, either by inadvertent edit error or bug. This I noticed after the file was saved. The file is a log file, so I always add to the end and leave the top alone, so I don't know how it got messed up, but messed up it is.
Is there any way to recover this file? I did not have backups enabled in BBEdit. Is there any way to search freed disk blocks to find blocks that contain the deleted data? I have an old backup copy that will contain much of the top, but not the middle, so I could use strings from that file as match criteria. Mac OS 9 had MacsBug which could search RAM. I doubt that can work with Mac OS X since Unix is a protected memory OS.
Any ideas would help.
Thanks,
Scott

WoodPlane wrote:
That looks like a way to read the whole disk to another file.
Yes.
The disk in question is an encrypted disk image, all of about 256 MB, so I have room to copy it to a different partition on the parent drive. Would the data read be encrypted or clear text?
The dd copy would be encrypted.
Why do you choose a block size of 4096? How can I tell the block size of the FS in question?
Why 4096? It's an arbitrary size (multiple of 512) to improve performance. It is the size of the memory buffer. I think the real block size is 512 bytes.
Could I programatically open() and read() the filesystem device file (/dev/disk3s2) and scan each block for the data I want, saving only those blocks that match?
Seems logical, but I do not know the details.
One way to go is to de-encrypted the disk image into a file. Make a copy of the image. Use disk utility to decrypt the image.
!http://farm3.static.flickr.com/2509/3971696155_84092e9ce6.jpg1
The grep command will scan a file.
You can use dd to copy data out.
You should be about to use a hex editor like 0xED.app on the file.
Macintosh-HD -> Applications -> Utilities -> Terminal
man grep
Here is the scan on the actual folder iMac
mac $ grep -bia   'pdisk'  /Users/mac/Desktop/iMac/z-find/.bash-backup-copy-initial-dot-copy.html
2536:#It is  best to do the pdisk command before you eject the
2674:another pdisk command to see what drive name has disappeared.  The
2815:sudo pdisk -l <br>
2875:man pdisk<br>
Here is the scan on the image file:
mac $ grep -bia   'pdisk' /Users/mac/Desktop/iMac-image-rw.dmg
9894376:&amp;#035;It is  best to do the pdisk command before you eject the
9894514:another pdisk command to see what drive name has disappeared.  The
9894655:sudo pdisk -l <br>
9894715:man pdisk<br>
9925263:  450  pdisk -l
9925279:  451  sudo pdisk -l
9925300:  452  sudo pdisk -l
9928669:mac $ sudo pdisk -l
9929943:pdisk: No valid block 1 on '/dev/rdisk1'
9929984:pdisk: No valid block 1 on '/dev/rdisk3'
9930810:Library/                        fd.gz                           pdisk-log.txt
9931311:System Folder9-19-7.img         find-search-results.xls         seepdisk
10011023:command.  I am searching for the word pdisk.  The symbols {}
10011260:"&amp;lowast;bash-&amp;lowast;"  -exec grep -bilr  'pdisk' {}
11723093:searching for the word pdisk where file names containing  "bash-"
11723518:-type f -exec grep -bil 'pdisk' {} \;<br>
13543912:&amp;#035;It is  best to do the pdisk command before you eject the
13544050:another pdisk command to see what drive name has disappeared.  The
13544191:sudo pdisk -l <br>
13544251:man pdisk<br>
13617640:&amp;#035;It is  best to do the pdisk command before you eject the
13617778:another pdisk command to see what drive name has disappeared.  The
13617919:sudo pdisk -l <br>
13617979:man pdisk<br>
13703656:&amp;#035;It is  best to do the pdisk command before you eject the
13703794:another pdisk command to see what drive name has disappeared.  The
13703935:sudo pdisk -l <br>
13703995:man pdisk<br>
13769192:&amp;#035;It is  best to do the pdisk command before you eject the
13769330:another pdisk command to see what drive name has disappeared.  The
13769471:sudo pdisk -l <br>
13769531:man pdisk<br>
13851112:&amp;#035;It is  best to do the pdisk command before you eject the
13851250:another pdisk command to see what drive name has disappeared.  The
13851391:sudo pdisk -l <br>
13851451:man pdisk<br>
mac $

Similar Messages

  • Are my iWeb files gone? Can I retreive them?

    Are my iWeb files gone? Can I retreive them?
    I had serveral files up on the server from as far back as my .mac account. Are they gone?

    brian miller1 wrote:
    Read through the link you provided. iWeb was a no go for me. Also I had several items other than HTML files to recover (zips and the like). are they of use via iWeb proceedure you describe?
    Nothing which was stored on your iDisk, including websites, Gallery pictures, or any sort of files, exists any more. I'm not sure what you mean by 'are they of use via iWeb proceedure you describe?' but in any event you cannot retrieve any of these files.
    If you open iWeb does it open to your website or to a blank site? If the former you can upload this as descibed in my page. If the latter you will have to start over from scratch. If you are in the latter case I would recommend not starting anything with iWeb, but finding another program to make your site - one which is still supported. As I mention in my page, RapidWeaver is worth looking at.

  • Drag and drop operation resulted in files gone missing

    I would really appreciate some help as I have lost about 80 files. Here's what happened: I had a big folder of several hundred files and I was moving those files– photographs – into subfolders.I selected the photo in bridge and then used a drag and drop method to move it. It all went well except in two instances. One group of photos I dragged it to the wrong folder but when I searched I found them. Another group has gone missing. I have searched the whole computer for names of some of the photos in the missing group.it is as if they vanished into thin air. What could have possibly happened?
    Thanks in advance!

    I selected the photo in bridge and then used a drag and drop method to move it. It all went well except in two instances.
    I always use the drag and drop method and if it goes wrong I usually are to fast and don't wait for Bridge to have completed or I did not point to the correct folder.
    Without knowing what system you are on and what version of bridge you are using I agree with Curt that the files must be somewhere on your system (also check the Bin) and you better use a dedicated system search for it.
    And what is "group.it"? If I do a google search it stops without result and group.it also has not understandable  or related results?

  • Iweb files are missing - can Time Capsule restore them?

    All of my iWeb files are missing.  How can one find these files in Time Capsule and restore them?
    Thanks, José

    iWeb stores the website data in a Domain.sites2 file whose default location is shown here..
    http://www.iwebformusicians.com/iWeb/iWeb-Tips.html
    Locate the file in Time Capsule and restore it to your Mac.
    To find out how to open the library folder and a Domain file when using Lion/Mountain Lion see this page...
    http://www.iwebformusicians.com/iWeb/mountain-lion.html

  • ITunes Error Message required files are missing - can't run

    Plugged my iPod Nano in and my iTunes gives error "iTunes cannot run because some of its required files are missing.  Please reinstall iTunes".  Tried to reinstall iTunes and get same error. 

    Old question. I solved the problem myself.

  • ITunes Library file gone missing

    Hi there,
    This is my first post
    Anyway on more upsetting words, my iTunes library has gone walkies!
    I have an iPhone 5 and an iPod Classic 160gb.
    So that means i have 2 different libraries.
    So ive had to change which library iTunes brings up whenever i use one or the other.
    However today i went as normal to change from my iPhone library to my iPod and the library file seems to have dissapeared!
    And im really stressing out . Look at the pictures and tell me if theres anything unusual.
    Please help me!!!

    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping.  Note that in iTunes 11 an "empty" library may show your past purchases with links to stream or download them.
    In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    Alternatively, depending on exactly when and why the library went missing, there may be a more recent .tmp file in the main iTunes folder that can be copied & renamed as iTunes Library.itl to restore the library to an earlier state. Look for a recent .tmp file that is similar in size to the .itl files in the Previous iTunes Libraries folder. If it has happened repeatedly you may want the earliest such file generated since the last iTunes upgrade.
    If applicable, see iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.
    I've noticed more of these missing library posts of late and a common factor to most since I started asking is AVG Anti-Virus. It seems in some cases it might be at least part of the reason why the library file disappears. Try excluding the iTunes folder from any AV scanning process.
    tt2

  • Time machine backup files gone and can't create new backup

    Last week I noticed on my Time Machine backup HD that the Backup.backupdb files were gone.  Also I am unable to complete backups any longer.  I get an error "The backup disk image “/Volumes/Time Machine-2/walle.sparsebundle” could not be accessed (error -1)."
    This Volume "Time Machine" is connected to an Airport Extreme 7.6.1. I have ejected the disk, disconnected all users, cycled the power on my computer (2.26Ghx MacBook running 10.7.5), Airport, and HD. All it does after I eject is that it give the Volume a new number...ie instead of "Time Machine" it becomes "Time Machine-1"...then "Time Machine-2" and repeates the error message with the new name.  So I cannot start a new backup because of the above error on top of not being able to find my old files.
    Thanks for the help

    Hmmm.. sorry to jump in but...
    I Wish I had seen this before I got mine.
    Mine has been doing this auto eject stuff too.
    I think I just plugged it in and TM let me select it but is it possible
    I should have reformatted it with DU first, like with all the WD drive problems ?
    Is it too late for that ?
    Or just try to return it or get rid of it ?
    TIA

  • Was typing an e-mail -trying to find "printer" - clicked SOME button now can't get back to my e-mail also top of page is missing/can't get to go down

    Went thru mozilla to business e-mail account/wanted to make a copy of notice to be sent/was clicking different buttons to find a "printer" all of a sudden the whole page went up and the top (bar,browser,everything disappeared) now can't find anything of mine only info to download mozilla??

    That was helpful but it didn't solve the problem. There were two red dots, now only one, though I copied and pasted the same password in both places. (I don't recall having to change the password in two places before).
    The red dot next to smtp.mail.me.com:(myname) disappeared
    The red dog next to smtp.me.com:(myname) is still there. It says, "trying to log in to this SMTP account failed. Verify that the username and password are correct."
    Thanks,
    Lizzy

  • (urgent)control file is missing, can any one advice me on this.

    Hi Gurus,
    Yesterday we had SAN storage problem from our unix admin and all the databases were down due to the san problem.
    all the mount points are now ok and when i started one of the database i got this problem
    idle> startup
    ORACLE instance started.
    Total System Global Area 524288000 bytes
    Fixed Size 2030232 bytes
    Variable Size 406848872 bytes
    Database Buffers 109051904 bytes
    Redo Buffers 6356992 bytes
    ORA-00205: error in identifying control file, check alert log for more info
    In alert log file i found this
    ALTER DATABASE MOUNT
    Wed Feb 7 00:01:28 2007
    ORA-00202: control file: '/ora99/oradata/test10g/control01.ctl'
    ORA-27037: unable to obtain file status
    SVR4 Error: 2: No such file or directory
    Additional information: 3
    Wed Feb 7 00:01:31 2007
    ORA-205 signalled during: ALTER DATABASE MOUNT...
    please any one advice me how to mount my database, i am not having backup of contol file too...
    thanks in advance

    Did you multiplex the control file ? May be you have multiplexed on another file system with names like control02.ctl, control03.ctl... etc. If yes, just make a copy of control02.ctl and put in the location of control01.ctl. Also rename the copy of control02.ctl to control01.ctl and try to restart the database.
    If only one control file was there, then you have to re-create the controlfile. Please go through the following docs.
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_5003.htm
    Also before doing anything, please take the backup of your database (ofcourse in this case it will be cold backup).

  • ITunes Top 100 has gone missing and i miss it :(

    Since the update with the addition of Ping i have not had iTunes charts as an option . It just comes up blank whenever i try to look at them . I think i am having withdrawl from not having it
    Anyone know whats going on ?! is it gone forever ?!
    Help a Homo out
    x

    I have had the same although it seems to have rectified itself today so I assume a glitch with iTunes.

  • ITunes library gone!  Can it be recovered?

    Having spent most of last weekend sorting out my sons ipod - I now have a problem with mine!! Only a hour ago my library was there - and I just went back and it's gone! completely! No where to be found! Pligged in my ipod and system tells me that it's found new hardware!! Then itunes openas and says that this ipod it linked to another library (not so). Everything still on ipod - so in fear of lossing that too I unplugged ipod - searched and searched recycle bin etc and found nothing. Any suggestions? I have been searching the postings as I recall last week reading a similar problem but regret I cannot find it now - so I hope I don't offend anyone by repating a similar question. Many thanks. SM

    Once I plug in my ipod will I be able to rebuild playlists?
    Just want to be clear so I ddon't direct you the wrong way and have your library messed up more, but did you add the "xml" file by dragging to itunes and it loaded all your songs in without the playlist or did you add the actual music files/songs to itunes and don't have playlist?
    Now - how do I back this up to prevent it happening again.
    It depends on what you have handy to backup on, like an external harddrive or a CD/DVD burner (DVD is better since they hold more info than a CD you end up with less disc)
    do you recommend updating to version 7
    THis LARGLY depends on what you want. I mean theres ALOT of really cool neat handy features in 7. THat said tho SOME, NOT ALL BUT SOME people have issues with it. Usually long as your system and windows is up to date and you have things backed up and have scanned and removed malware/adware you should be OK.
    I can only talk from experience, but for me I've not had any issues on my old 5-6 year old test machine. I can't say if you will have issues or not.
    Again not all, but most posting here with issues about iTUnes 7 I have helped have one of these reasons why there having issues
    1) have not updated there system and windows.
    2) have malware "Fudging" things up
    3) was impatant with the "Gapless scan" itunes does on first setup, cancelled it or forced itunes to shut down and not have a fudged up system because they could not wait.
    4) Didn't have there antivirus disabled during install or didn't manually remove itunes and qwuicktime completely before the install (Yes apple doesn't say to do this but in some cases when I helped them clean out itunes and quicktime, then reinstall itunes 7, everything worked fine)
    Message was edited by: pac_80

  • HotSyncLog File is missing - How do I recover it?

    Don't know what happened but my HotSyncLog.htm file is gone.  What needs to be done to recover it?  It is not in the trash folder and does not show up in any searches I have tried.  Do I need to reinstall?
    Post relates to: Palm TX

    Your going to have to add your windows user into the permissions with full control.  Right-click on the PalmOS Desktop folder and select properties.  In the properties window, go over to the Security tab.  In the Security tab, click on the edit button.  In the next screen, click the Add button.  In the next screen, look at the white text box at the bottom and input the name of your windows login there and then click the Check Names buton and click ok.  From the previous screen, select you login name from the groups box and then check off thge allow bos for full control.  You should then notice that more allows are selected.  Click apply and then ok button, wait for the changes to complete, and then ok out of Properties window.  That should do it.
    Post relates to: Treo 650 (Unlocked GSM)

  • Help! My "blur" tool has gone missing, how do I recover it??

    I cant find my blur tool in photoshop, how do I recover it?

    njw0423 wrote:
    nevermind, i found out how to do that. but it didnt work. any more suggestions?
    You need to work a little harder at helping others help you.  It cannot be done by texting one line at a time.
    Take the time to capture your screen to show what you are seeing.  It's very easy to post images here via the little camera icon just above the edit box in the web interface.
    -Noel

  • Indesign says file damaged can not be recovered HELP!

    Hello, I just tried to open a very important file and the resultant dialog box says
    "Can not open file. File damaged. Can not be recovered."
    the file has all of my important accounting data in it. Does any one have any alternative ways for opening this file.
    Please Help
    Thank you in advance

    Best hope is probably sending it to Markzware, unless you have a license for Quark and the ID2Q and Q2ID plugins. They cahrge around $200 I believe, if successful.
    Fix Your Bad InDesign Files!

  • I imported files from an external hard drive to Itunes on a new computer.  they imported & play fine, but the ratings & playlists are gone & i am unable to update any info.  I found a file name playlist on old drive & imported now most files are missing!

    I imported files from an external hard drive to Itunes on a new computer.  they imported & play fine, but the ratings & playlists are gone & i am unable to update any info.  I found a file name playlist on old drive & imported now most files are missing!  Help!

    Can you locate the iTunes Library.itl file on the old drive? Ideally you would have simply copied over the entire iTunes folder structure from <User's Music> on the old computer into <User's Music> on the new one to transfer the library will all playlists, ratings, play counts etc. intact.
    tt2

Maybe you are looking for