F-ing up myself is part of my routine. I always rm files that I don’t mean to (obviously not always but it happens). So I think it would be nice to have separate ‘delete’ permission. With that I could protect my files from accidental 'rm’s. What’s your opinion

  • some_guy@lemmy.sdf.org
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    3 days ago

    Alias rm to a flag that makes you affirm. On my phone, can’t be bothered to look at a man page.

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    Daily backups. Then you can have as much wild ambition as you like. Disk failures do not care for your permissions bits anyway.

    Practically though, one thing I find that’s a good habit to get into is to use rmdir on directories that you know should be empty instead of rm -rf. If you’ve made a mistake and try to delete the wrong folder, it’ll error out.

    • IsoKiero@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 days ago

      And then get screwed over when you’re using another system without said alias. As I need to work on multiple different linux-hosts both as a selfhoster and on work I’d strongly suggest against aliasing any system command to something else and getting used to it.

  • Are you running on btrfs? If not, why not? If so, install snapper and grub-snap or refind-btrfs, or whatever, and go wild.

    Sounds like you might also be missing backups, but snapper you can have run every 10 minutes at almost no overhead. Then it won’t matter if you delete something; you can always grab it out of a snapshot.

  • solrize@lemmy.ml
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    3 days ago

    These days if the file is write protected, you get prompted for whether you really want to remove it. I don’t know when that change appeared or whether it’s universal.

    • t0mri@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      No thats how it works. It hasnt changed. But lemmy hit you with my experience. I have ‘notes’ Dir. I write a lot. So I want myself ‘write’ permission but ‘delete’