bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm can accidentally delete dirs


From: Alfred M. Szmidt
Subject: Re: rm can accidentally delete dirs
Date: Sun, 09 Feb 2003 15:23:57 +0100

   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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]