Why doesn't find/rm -iname '*phpmyadmin' delete phpMyAdmin-Version-XYZ.zip?

The problem is that you are matching a file that ends in phpmyadmin (case-insensitively) by using the pattern *phpmyadmin. To get any file that contains the string phpmyadmin (case-insensitively), use -iname '*phpmyadmin*':

find ./ -iname '*phpmyadmin*' -exec rm -rf {} \;

Perhaps getting the matched files before removal would be sane:

find ./ -iname '*phpmyadmin*'

To answer your first question, there is no option in rm in userspace to deal with inodes.


find ./ -iname '*phpmyadmin*' -exec /usr/lib/klibc/bin/nuke {} +

This works even if somebody creates a -phpmyadmin directory.

Tags:

Find

Rm