Stupid Unix tricks (was Re: Weird Files...)

Gordon Keegan lgk011 at kickme.dma.isg.mot.com
Fri Oct 27 14:39:28 EDT 2000


> 
> The rm -- -f2 version is GNU rm specific IIRC...
> 

Actually, the only system I found that the "--" notation didn't work on
was an old legacy SunOS 4.1.4 system we've got (don't ask...)  It did work
on HP-UX 9.05, 10.20, & 11.0, Solaris 2.5.1, 2.6, and 7, and AIX 4.2.1.

To introduce yet another wrinkle (YAW?) trying to remove a file called
"-r" or "-f" or related always gave me the willies.  I got into the habit
of doing a "mv" first:

	mv -- -f bad.f
	rm bad.f

just to make sure I was deleting only the weird file and no others.

gordon

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list