Help, moved a file and now it's gone

Discussion in 'Mac Basics and Help' started by odinsride, May 26, 2007.

  1. odinsride macrumors 65816

    odinsride

    Joined:
    Apr 11, 2007
    #1
    I just used the mv command from terminal to move a directory that contained a large dmg file, and when i checked the file size at its new location it's registered at 0 bytes. The file is there in the new directory, however.

    Is there anyway to recover the lost data?
     
  2. sparkyms macrumors 65816

    Joined:
    Feb 22, 2007
    Location:
    Southampton UK
    #2
    I guess you can search in spotlight, see if the file has duplicated somewhere else for some non-apparent reason.

    I don't actually know of any data-recovery tools for the mac unfortunately, but im sure there is one, if its just disappeared from the realms of your HD.
     
  3. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #3
    where'd you move it to? like, particulars..different partition, different filesystem...
     
  4. odinsride thread starter macrumors 65816

    odinsride

    Joined:
    Apr 11, 2007
    #4
    No luck with spotlight

    I moved it to a different folder on the same partition
     
  5. jng macrumors 65816

    jng

    Joined:
    Apr 6, 2007
    Location:
    Germany
    #5
    Do you still have the log? I can't imagine why anyone would want to move a file via terminal. But it sounds like you did more than just move it.
     
  6. Wolfpup macrumors 68030

    Joined:
    Sep 7, 2006
    #6
    I'm not sure if mv would know how to handle all files like the finder does, but I don't know why it would have a problem with a disk image. :confused:
     
  7. Winterfell macrumors regular

    Joined:
    Apr 3, 2007
    Location:
    Tulsa, Oklahoma
    #7
    The `mv` utility has been around in *nix systems for years; it's almost impossible that it could just "lose" a file.

    Can you open your Terminal and use the up arrows to cycle through your recent commands? Copy + Paste them here for us to see.
     
  8. odinsride thread starter macrumors 65816

    odinsride

    Joined:
    Apr 11, 2007
    #8
    I know how to use Linux, I've been using it for years for work. I don't see why mv would just lose a file like that. I did it how I would normally do it on any *nix system, but it's just giving me a zero byte file, which boggles me. The reason I used the terminal to do this is because I was already working with something in terminal and was too lazy to go find the stuff in finder. People who use *nix regularly will understand this :p
     
  9. Winterfell macrumors regular

    Joined:
    Apr 3, 2007
    Location:
    Tulsa, Oklahoma
    #9
    I'll take your word for it. :) I don't know why it would disappear though.

    I actually prefer managing files and folders via terminal over guis. There's a finer grain of control, and I tend to make mistakes less often.
     
  10. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #10
    Because often times, Finder doesn't even show the file/folder, if it lets you do anything at all (cause half the time it doesn't even prompt for a password). What's so hard about mv /somefolder/some\ file /someotherfolder?

    it shouldn't, and why would mv not handle things the same way finder does? if anything mv does a better job with files with weird permissions, vs. Finder spitting out the generic "some files cannot be copied" message.
    I go out of my way to alt-tab to terminal or use visor to move/copy/manipulate a lot of files, it's just a lot faster. :D
     
  11. Wolfpup macrumors 68030

    Joined:
    Sep 7, 2006
    #11
    Well, there are some possible issues with the like the resource fork and that stuff that I think HFS+ is still using. Plus some things that look like files in the Finder are of course really directories with tons of files in them.

    I *think* I remember reading that some of the regular Unix commands won't preserve all the extra resource stuff always the way the Finder will. I'm not 100% positive on that though, and even still that doesn't explain why it didn't successfully at least copy the file itself!

    Have you tried repairing disk permissions, doing any kind of maintenance stuff like that? (I think I remember that you already have, but just in case).

    I really can't understand why the mv command would do anything weird like that. Especially not when you're just moving it to a different location on the same disk! I mean maybe if it were a removable disk and you unplugged it before the file actually got written (like it wasn't flushed out to the disk or something?), but that makes no sense here.

    I use the command line quite a bit to move stuff, navigate, etc., and I've never seen anything weird like that. I really don't get it :confused: It's bugging me that we can't figure this out!
     
  12. Wolfpup macrumors 68030

    Joined:
    Sep 7, 2006
    #12
  13. jng macrumors 65816

    jng

    Joined:
    Apr 6, 2007
    Location:
    Germany
    #13

    Chill out. Obviously I asked before the OP revealed he is an experienced *nix user.

    It's not hard. I do it I SSH into a server root for work (albeit seldom). But if one doesn't know what s/he is doing, it's very easy to mess up a file. When I meant he did more than move it, I was wondering about other commands he might have entered during the session esp. immediately before and after the mv. And a log would regardless help sort it out. Well, the log would be a start.
     
  14. odinsride thread starter macrumors 65816

    odinsride

    Joined:
    Apr 11, 2007
    #14
    Well It's okay guys I found a backup of the file. But this issue with mv really has me scratching my head. I'll do some experimenting with some junk files when I get a chance to see if I can reproduce the problem.
     

Share This Page