Outbound Link Summary:
18 years ago
did i find a unix bug?
scenario: a directory foo
containing two files called bar
and bar.tmp
.
now issue mv foo/bar*
(yes, there's no second argument.)
result: the contents of bar.tmp
will be overwritten with those of bar
(ie. bar
will be renamed to bar.tmp
).
you can witness the process in verbose mode:
user@host: mv -v foo/bar*
i think that's quite unnerving./path/to/foo/bar' ->
/path/to/foo/bar.tmp'