Deleting large no of files on linux eats up CPU
- by Sanjay
I generate more than 50GB of cache files on my RHEL server (and typical file size is 200kb so no of files is huge). When I try to delete these files it takes 8-10 hours.
However, the bigger issue is that the system load goes to critical for these 8-10 hours. Is there anyway where I can keep the system load under control during the deletion.
I tried using
nice -n19 rm -rf *
but that doesn't help in system load.