I had over 100 files like
log-12 log-123 log-34 ....
the above answers did not help me
but the following command helped me.
find . -name "log-*" -exec rm -rf {} \;
I gave -type how . , so it deletes both files and folders, starting with log-
rm -rf deletes folders recursively, even if they have files.
if you want the folders to be alone
find -type d -name "log-*" -exec rm -rf {} \;
single files
find -type f -name "log-*" -exec rm -rf {} \;
Thamaraiselvam Jun 09 '16 at 13:30 2016-06-09 13:30
source share