sudo’s Hall of pain

    • kattfisk@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      6
      ·
      3 months ago

      Aha! I didn’t get that you meant the issue was accidentally using -r instead of -R since both you and OP wrote the upper case one.

      I’m a lot more used to -R so I instead get caught off by commands where that means something other than recursive :)

      I mostly use symbolic mode and honestly don’t get why everyone else seems to use octal all the time.

      • unalivejoy@lemm.ee
        link
        fedilink
        English
        arrow-up
        4
        ·
        3 months ago

        People probably confuse it with tools like cp, rm, ls, etc as they use -r for file recursion.

        • kattfisk@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          ls -r actually lists entries in reverse order! It needs -R as well.

          cp and rm accept either.

          Looking at some man pages the only commands I found where -R didn’t work were scp and gzip where it doesn’t do anything, and rsync where it’s “use relative path names”.

          (Caveat: BSD utils might be different, who knows what those devils get up to!)