Bonus points if someone warned you and you went ahead anyway.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 months ago

    On Linux, about twenty-five years back, on stock Red Hat Linux (and, I suspect, all Linux distributions) the bash shell used to match .* against both . – the current directory – and .. – the parent directory.

    This means that if you ran rm -rf .*, in a directory, you’d delete all the files starting with a “.” – “hidden” files in the current directory. You’d also start recursively-deleting the contents of the parent directory.

    This led to all kinds of excitement if, in a directory in your home directory, you’d try deleting all dotfiles. The rm command would also attempt to wipe out all of the contents of your home directory – all of your files. And this isn’t a system where there’s some “undo delete” option, unless you had a backup system in place (which is a good idea, but wasn’t something set up by default).

    These days, bash doesn’t do that.