Thread: Undelete utilities

  1. #46
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    and after all that:
    0+0 records in
    0+0 records out
    0 bytes (0 B) copied, 2640.14 seconds, 0.0 kB/s
    I don't get it, what went wrong?

  2. #47
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    maybe you need:
    Code:
    "/media/USB MEMORY/part1"

  3. #48
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    It didn't report any errors with the file/path, the file even showed up on my USB key, although completely empty. I've modified the command as salem suggested with arguments that are more byte-friendly (and replaced the stdout redirector with an explcit of=) and tried again:
    Code:
     sudo dd if=/dev/sda2 bs=4096 count=7813 skip=118383000024 of=/media/"USB MEMORY"/file01
    *crosses fingers*

    edit: I think I know what is going wrong, I've used the byte offset where it wants a block offset... sigh (ctrl+c, start-over).
    Code:
     sudo dd if=/dev/sda2 bs=4096 count=7813 skip=231216797 of=/media/"USB MEMORY"/file01
    Last edited by @nthony; 08-31-2007 at 04:16 PM.

  4. #49
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    I tried arbitrarly smaller numbers (i.e bs=1 count=1953 and skip=10240, and this seems to make it happy now, apparently it doesn't like a bs value of 4K...

    So now I'm seeing what definitely is parts of my file, large parts still in tact, but large parts seemingly missing or mangled. Oddest of all though is that certain sections of the file are repeated again and again... wierd... well I've got a lot to sift through to see if any of it is still worth recovering but its better than being completely helpless. Thanks a lot to everyone who helped here, I'll let you all know how it turns out.
    Last edited by @nthony; 08-31-2007 at 08:46 PM.

  5. #50
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by @nthony View Post
    edit: I think I know what is going wrong, I've used the byte offset where it wants a block offset... sigh (ctrl+c, start-over).
    Code:
     sudo dd if=/dev/sda2 bs=4096 count=7813 skip=231216797 of=/media/"USB MEMORY"/file01
    Another thing to consider is that some of the numbers involved here are very large -- larger than a 32 bit integer. I wouldn't be surprised if something somewhere is choking because of that. Although I'd expect "dd" to handle it appropriately, being that it is a heavily used core utility.

    I'm glad you've been able to recover at least some of your work.

  6. #51
    Registered Abuser
    Join Date
    Jun 2006
    Location
    Toronto
    Posts
    591
    Update:
    After spending the last 3 days parsing through approx. 75mb of mangled, misplaced, and run-together binary and text, I was able to pull from the wreckage significant portions of my original code (I believe the fragments of code came from the remnants of temporary files created by CodeBlocks before saving, which would explain why there were so many repeated code fragments). I would put the retrieval success of my work somewhere between 80-87% of its original state before the crash. I still have some work to do to get it back up to its previous state, but all things considered, THIS WAS LARGELY IN PART A HUGE SUCCESS. And I would like to extend my deepest gratitude and thanks to those of you who have provided so much help for me in this thread. On top of everything else, this was also an unexpected, but much appreciated learning experience for myself; I gained a great deal more knowledge on the structure of internal data storage, as well as methods to ensure that it stays stored (which I will begin deploying immediately!).
    Thanks again everyone!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Faster C coding thanks to utilities?
    By rommegrot in forum C Programming
    Replies: 5
    Last Post: 04-25-2008, 02:34 PM
  2. How Do You Undelete A File?
    By Krak in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 06-02-2004, 12:23 AM
  3. Creating utilities for games.
    By RealityFusion in forum Game Programming
    Replies: 6
    Last Post: 04-12-2004, 07:31 AM
  4. Including
    By gvector1 in forum C++ Programming
    Replies: 2
    Last Post: 02-20-2003, 09:13 AM