I have setup a cronjob to remove a file that is being generated by another script each hour.
The file´s name: inc.php?cronUsers
My current command looks like this:
rm -f "/root/inc.php?cronUsers"
The problem is that, when there are more than one file, the file names change like this:
inc.php?cronUsers.1,inc.php?cronUsers.2 and so on..
I am realy new to all of this, so the only lucky guess was to do:
rm -f "/root/inc.php?cronUsers.*"
But this seems not work.
How else could I delete all files that start with inc.php?cronUsers ?
rm -f inc.php\?cronUsers*
seems to work :
Regards
(why did you write your question title as “that starts with *” ?? Did I miss something?)