• Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 months ago

    I feel like the main reason the distinction exists, is because deleting a whole directory can be potentially catastrophic.

    I looked at Trashy yesterday, which gives you a command trash my_file that just moves the file into the trashcan folder. Well, and that decided to make no distinction between files and directories, which does make sense to me, since you can just restore a deleted directory.

    • Captain Aggravated@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 months 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?