Re: rm can accidentally delete dirs
"Alfred M. Szmidt" <[email protected]>
| Newsgroups | gmane.comp.gnu.fileutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
rm *f t* should delete '-rf' and the test file, leaving the directory, however, it interperates -rf as arguments, deleteing the folder and its contents. (It also leaves the -rf file). Not a bug. Wildcards get expanded by the shell, thus what you are typing (i.e. what the shell is seeing) is "rm -rf testdir". So to be sure that you want to delete the directory -rf to, type "rm -- *f", or some such.