Tugger the SLUGger!SLUG Mailing List Archives

[SLUG] Re: Idiot file remove


\begin{Crossfire}
> try: rm -- -z
> 
> The double dash tells most GNU programs to stop processing options.

even on non-gnu rm:

 rm ./-z

will work. its just a matter of making it not look like an option ;)


"rm *z" won't work, since the shell expands the glob before running
rm. thus rm still sees "rm -z", and you get the original problem.

an amusing trick i saw someone suggest was to place a "-i" file in
important directores, then "rm *" (because of the sort order) would
get "rm -i *". just a little too fragile for "important directories",
methinks..

-- 
 - Gus