• meow
    link
    fedilink
    arrow-up
    22
    ·
    11 months ago

    you don’t need the ! when you have the w, because your changes already get saved.

    • raptir@lemdro.id
      link
      fedilink
      English
      arrow-up
      18
      ·
      11 months ago

      If anything it is dangerous as it will still exit even if changes cannot be saved.

    • DocMcStuffin@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      11 months ago

      Try editing a file in /etc as a regular user. It happens sometimes and you really want that warning that the write failed.

      Anyway, :x is superior. It only writes if there are changes. So, your mtime doesn’t change unnecessarily.

      • meow
        link
        fedilink
        arrow-up
        4
        ·
        11 months ago

        wait people care about the mtime?

        • carcus@lemmy.ml
          link
          fedilink
          English
          arrow-up
          4
          ·
          11 months ago

          I’ve had to do forensics on a rogue change. In finding when and who actually changed the file, mtime can help narrow it down when compared with wtmp.