On 6/22/19 10:31 AM, sixpack13 wrote:
sudo rm -rf /boot/loader/entries/*MY*;
sudo rm -rf /boot/*MY* /lib/modules/*MY*;
sudo grub2-mkconfig -o /boot/grub2/grub.cfg;
Side point, you don't need semicolons at the end. Those are only to
separate commands on the same line.
and now my problem:
the first sudo rm -rfv command does NOTHING, means the loader entry is still there and I
need to rm it by hand.
whereas the second rm command does what I espect.
You are getting tricked by a common misunderstanding. The expansion of
wildcards is done by the shell before running the command and rm only
uses exactly what it is given. As a user, you don't have permission to
look in the entries directory. That means that the wildcards are passed
directly to rm as-is because the shell can't find any matches. rm
doesn't find a file with a name called literally "*MY*", so it doesn't
delete anything.