Wanted to know what is the best way to remove any files from directory no matter what their extension is based on a partial name. You have multiple files in directory but wanted to delete specifices file which files name are started from or end from or having some characters.
Cron_foo_something.jpg Cron_foo_today.jpg Text_something.png Logs_foo_site.html logo.php
The simple way go to directory path:
run command rm. The following example used for file name having _foo_
you can directly run rm commant by passing file path
Delete the file which name started from Cron_foo_
Delete the file which name started from _something