I think some variant of that one gets done at least once by everyone who's ever used a Unix/Linux system.
Also, my favorite version of this was discovering the hard way that an earlyish (but it had been around for several years) version of Midnight Commander would happily follow .. when told to remove a directory and everything under it. You, um, tend to assume your file manager is smarter than that....
(A handy trick: most of the time, you want .??*. This will miss names like .a, but the number of possible such names is small enough that manual cleanup is easy.)
(Also, minor pedantry; they're not regular expressions but file globs. Globs are much simpler, which as usual is both blessing and curse. On the other hand, you'd curse a lot more if the shell made you use regexes.)
no subject
Also, my favorite version of this was discovering the hard way that an earlyish (but it had been around for several years) version of Midnight Commander would happily follow .. when told to remove a directory and everything under it. You, um, tend to assume your file manager is smarter than that....
(A handy trick: most of the time, you want .??*. This will miss names like .a, but the number of possible such names is small enough that manual cleanup is easy.)
(Also, minor pedantry; they're not regular expressions but file globs. Globs are much simpler, which as usual is both blessing and curse. On the other hand, you'd curse a lot more if the shell made you use regexes.)