for real though, modern linux distros will rarely require you to enter a command line, and if you do, a quick internet search can usually help you find out what you need to enter

  • sooper_dooper_roofer [none/use name]
    ·
    3 years ago

    The -r flag, or --recursive recursively traverses all the directories in the path file that you specify (so like if you have a directory stuff/ which has files a.txt, b.pdf, and subdirectory c/ then rm -r stuff/ would remove both files as well as c/ and its contents.

    So what would happen if you just did "rm stuff/" without the recursive flag? Shouldn't it work the same way and delete all of stuff/ contents?

    also how do you do that code font thingy

    • crime [she/her, any]
      ·
      3 years ago

      rm stuff/ without the recursive flag fails with an error (rm: cannot remove 'stuff': Is a directory) and doesn't remove anything. I'd guess the decision there was to have the least-destructive end result for ambiguous behavior, but I'm not entirely sure what the history is there, pretty sure that command is older than I am :)

      The code font thingy is the back tick character: `