In the rm section of horror one story hints towards, and another explicitly notes,
> .* expands to ../*
Not on my box it doesn't. Was this true in some (rather cruel) past?
> .* expands to ../*
Not on my box it doesn't. Was this true in some (rather cruel) past?
Unix in the past was for the tough men...
After closer inspection, it turns out that this is because I'm a zsh user:
% zsh -c 'echo .*'
zsh:1: no matches found: .*
% bash -c 'echo .*'
. ..
Indeed, zsh's manual states:> No filename generation pattern matches the files `.' or `..'.
… and I've just added another entry to my list of reasons as to why I love zsh.
$ mkdir foo
$ cd foo
$ touch 1
$ touch 2
$ touch 3
$ rm *
$ ls -la .
total 0
drwxr-xr-x 2 mike wheel 68 3 Sep 14:41 .
drwxrwxrwt 18 root wheel 612 3 Sep 14:41 ..Plus, it mentions . and .. as no-nos