Not able to delete lot of files at once in linux

Solution 1:

GNU find has the -delete option, which is always safe:

find . -type -f -delete

As commented elsewhere, you may use xargs too, but be very careful how you use it.

find . -type f -print0 | xargs -0 rm -vf

Solution 2:

All the other answers assume that you want to keep the directories, but it's not clear from your original message that you do; moreover, even if you wanted to keep the structure, you'll need to remove and recreate the directories anyway, because the directory files have become very large - they won't shrink when you empty them, and their size will massively slow down operations in them in future.

So have you considered just

rm -rf log*

Solution 3:

If you can manage the many errors when rm fails to delete directories, you can approach the problem from the other side

for dir in $(find . -type d)
do
  rm $dir/*
done