2016-12-28 The question was how to delete a bunch of hidden directories. The user didn't want to use `rm -r .*' because he was unsure how it would react on `..' -- do you know? For sure? The brave one would just test it and discover (in the bash): $ rm -r .* rm: cannot remove directory: `.' rm: cannot remove directory: `..' I suggested to use `.??*', because that usually matches all those directories you mean, excluding matching `.' and `..'. I use that from time to time. More exact, but harder to type is `.[!.]*'. (I'm always a bit unsure with the negation of character class ne- gation in the shell, and if I'd enter `^' instead of `!', the result would be just what I wanted to avoid!) Interesting is that the mksh does not expand `..*': $ ls -d ..* ls: cannot access ..*: No such file or directory The bash, as shown above, does: $ ls -d ..* Likewise, `.*' does not contain `.' and `..' in mksh. This is described in its manpage: Note that mksh (and pdksh) never matches ‘.’ and ‘..’, but AT&T UNIX ksh, Bourne sh, and GNU bash do. Note that none of the above pattern elements match ei- ther a period (‘.’) at the start of a file name or a slash (‘/’), even if they are explicitly used in a [..] sequence; also, the names ‘.’ and ‘..’ are never matched, even by the pattern ‘.*’. [0] [0] https://debianforum.de/forum/viewtopic.php?f=34&t=163503&p=1115448#p1115448 http://marmaro.de/lue/ markus schnalke