• Captain Aggravated@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    My solution: rm will remove an empty directory, while a full directory will throw either an “are you sure? y/N” or require you to use rm -r. Why have a command whose only job is to remove an empty directory?

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 hours ago

      Yeah, I feel like a big part of the reason it was designed like that, is because it was designed in the 70s, where you couldn’t really throw up interactive prompts. But interactive prompts are also somewhat tricky for scripting, as it’s difficult to detect whether a user could respond to the prompt, meaning the script might just hang there forever.

      That’s kind of the problem. You almost need separate tools for scripting and interactive use, but having separate tools is also not great, since people will inherently try to use the tool they know for everything…