you are viewing a single comment's thread
view the rest of the comments
[–] 19 points 4 months ago (6 children)

Or use /* for the path so it globs to all directories under / whilst not triggering the logic which requires --no-preserve-root.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 33 points 4 months ago (3 children)

    Yes, that's how I nuked my workstation once. Part of my development routine was running sudo rm -rf $SDCARD/*. Guess what happens when SDCARD isn't defined.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 9 points 4 months ago (1 child)

    set -u is your friend. Unless you're running that command interactively, in which case it just exits the shell without giving any warning at all. Oh, the joys of shells written to be compatible with scripts created 20 years ago...

  • source
  • parent
  • hideshow 1 child comment