Today had some important markdown file that accidentally deleted on my SSD and had to go over the recovery of it.

All I did was this:


run sudo systemctl status fstrim.timer to check how often TRIM runs on my system (apparently it runs weekly and the next scheduled run was in 3 days)

run sudo pacman -S testdisk

run sudo photorec

choose the correct partition where the files were deleted

choose filesystem type (ext4)

choose a destination folder where to save recovered files

start recovery

10-15 minutes and it’s done.

open nvim in parent folder and grep for content in the file that I remember adding today


That’s it - the whole process was so fast. No googling through 10 different sites with their shitty flashy UIs promising “free recovery,” wondering whether this is even trustworthy to install on your machine, dealing with installers that’ll sneak in annoying software if you click too fast, only to have them ask for payment later. No navigating complex GUIs either.

I was so thankful for this I actually donated to the maintainers of the software. Software done right.

  • styanax@lemmy.world
    link
    fedilink
    arrow-up
    20
    ·
    1 day ago

    In the old days, we would ls /usr/bin/ (sic, there are several locations defined for apps) and either look at the man page (if it existed) for the items we saw, or just run the commands with a --help option to figure out what they did. At best we maybe had an O’Reilly book (the ones with animals on the covers) or friends to ask. You can still do that today instead of reading blog posts or websites, just look, be curious and be willing to break something by accident. :)

    Part of the Linux journey is to be inquisitive and break some stuff so you can learn to fix it - unlike say Windows, on a Unix-style system the filesystem is laid out in a very specific way (there’s a specification [1]) so one always know where “things” are - docs go here, icons go there, programs go here, configs go there… - lending itself to just poking around and seeing what something does when you run it.

    After awhile your brain adjusts and starts to see all the beautiful patterns in design of the typical Linux OS/distro because it’s all laid out in a logical manner and documented how it’s supposed to work if you play the game correctly.

    [1] https://refspecs.linuxfoundation.org/fhs.shtml

    • AnUnusualRelic@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      10 hours ago

      In the old days, we would ls /usr/bin/ (sic, there are several locations defined for apps) and either look at the man page (if it existed) for the items we saw, or just run the commands with a --help option to figure out what they did

      I confirm, that’s exactly what I did in the 90s.

    • balsoft@lemmy.ml
      link
      fedilink
      arrow-up
      9
      ·
      1 day ago

      In the old days, your OS would come with a paper manual describing all the commands in great detail. Nowadays the OS is so complex that you can’t be expected (and don’t really need to) know all the commands that are there. But getting one of those old UNIX/early Linux manuals and reading through it would be a great start.

      • styanax@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 hours ago

        Two kinds of nerds: the read the manuals, follow the instructions folks… and then my people, the plug it in turn it on push the button first crew. :)

      • AnUnusualRelic@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        8 hours ago

        It would come with a fucking walk wall full of manuals. Only toy systems (like ms dos) came with a single manual.