[Mageia-dev] [Bug 8177] rm command can't delete file, unless using the full path for the rm binary "/bin/rm"

andre999 andre999mga at laposte.net
Fri Nov 23 23:53:49 CET 2012


Colin Guthrie a écrit :
> 'Twas brillig, and Michael Wood at 22/11/12 14:45 did gyre and gimble:
>>
>> Or if you happy to run rm as it was written and risk deleting something
>> you didn't want too, then comment out the alias (and any others that get
>> on your nerves:) ) from /etc/profile.d/60alias.sh
>
> While it technically is a config file, it's also numeric which means
> that one day, it *might* be renumbered for whatever need at the time.
>
> I therefore try to always avoid editing such files whenever possible.
>
> Instead, I'd personally recommend creating your own file:
>
> /etc/profile.d/999-fsck-the-defaults.sh
>
> and in it just put:
> alias rm=rm
>
> or similar to "undo" the earlier changes.
>
> Sure there is a tiny amount more to do at init, but it's pretty minimal
> and you likely won't notice.
>
> Col
>

That's what I do too (creating a custom file) -- for various other 
commands.  That also ensures that it isn't overwritten by any updates.

For rm, I'd rather have confirmation.
(reminds me of the rm -f 127.0.0.1 joke)


-- 
André


More information about the Mageia-dev mailing list