How can I delete a file with "executeCommandLine" ? (i.e.: snap.cgi?chn=0.2)

Hi,

how can I delete this kind of files from oH with the execute CommandLine command inside a oH rule?

-rw-rw-r-- 1 openhab openhab 208K Mar 16 18:48 /var/lib/openhab2/snap.cgi?chn=0
-rw-rw-r-- 1 openhab openhab 208K Mar 16 18:48 /var/lib/openhab2/snap.cgi?chn=0.1
-rw-rw-r-- 1 openhab openhab 203K Mar 16 18:49 /var/lib/openhab2/snap.cgi?chn=0.2
-rw-rw-r-- 1 openhab openhab 147K Mar 16 18:49 /var/lib/openhab2/snap.cgi?chn=0.3

From shell it’s possible with (i.e.) simply:
rm /var/lib/openhab2/snap.cgi?chn=*

But inside oH it will not work,
I try “/bin/rm /var/lib/openhab2/snap.cgi*”)
I try “/bin/rm /var/lib/openhab2/snap.cgi?chn=0.")
I try "/bin/rm "/var/lib/openhab2/snap.cgi?chn=
” "
I try "/bin/rm “/var/lib/openhab2/snap.cgi?chn=0.*” "
I try “/bin/rm /var/lib/openhab2/snap.cgi?chn=*” "

If I give a fullname (from one specific existing file), it’s working, i.e.:
executeCommandLine("/bin/rm /var/lib/openhab2/snap.cgi?chn=0.3") => deleted

Any hint?

It’s not a good idea to delete anything from var/lib/openhab2 when OH is running.

OK, I find same file under /srv/openhab2-userdata/
there same behaviour.

(the files are created from a wget-command startet from oH)

How can I remove the files “snap.cgi?chn=*” using a oH “rm” command ?
(Background: If not deleted, the next generated files are counted up (0.1, 0.2, …))