11
Root
4y

My .pryrc and a Ruby script it loaded (in another directory) both disappeared seemingly without cause. I lost days of work including a bunch of debugging and performance utilities I wrote over the past year.

But I have no clue how this happened. Neither the .pryrc file nor the script’s folder are tracked by git, so it wouldn’t have been deleted, overwritten, stashed and dropped, etc. None of the other dot files are missing, and the folder is still present, albeit with one fewer files. I wouldn’t delete them, and commands that would delete them do not appear in my zsh history. So I’m at a loss. Figuratively and literally.

They’re just. Gone.

Is there any way to recover missing files on OSX?

I never thought I’d need a backup solution for local scripts.

Comments
  • 0
    Time Maschine or ur fkt
  • 0
    I like testdisk, I'm sure there are better tools but I never needed another tool as it has always worked. You do need to unmount the partition for it to work though.
  • 1
    Are you on an ext filesystem? There is a utility for finding all lost nodes. It won't give you filenames, but it WILL have the full file contents if you grep for it. You'll get multiple versions probably, so you'll have to find the newest one.
  • 0
    @junon I have no idea; it’s a Mac and doesn’t tell me afaik.

    But: Details!
  • 1
    Oh it's the root partition on a nonremovable drive, right? So no unmounting.
  • 1
    @Root I can't find the name of the utility now but there's one called Testdisk. It only works on EXT4 filesystems though. I haven't tried this one (I remember using another one) but it looks like it does something similar.
  • 1
    @root

    Newer osx machines are ext4 iirc
  • 0
    @Root has anyone maybe added hooks for git clean...

    A coworker of mine got tarred and feathered for pulling that stunt.
  • 0
    @IntrusionCM Not that I know of.
Add Comment