Now there is a requirement to delete slow cache files in the background. The cache files are very large. Sometimes a single file is hundreds of gigabytes. When deleting, the hard disk usage must not exceed 5%~10%. Is there any way?
win7 NTFS partition
In fact, you can also ask, how to delete part of the file instead of the entire file? It seems that I can't escape the IO of reading? Can I directly erase the contents of a file?
Written a github. Welcome to help test: github link
I tried using truncate. It can control the deletion speed and content, but I didn’t do a detailed test. I only looked at the performance manager of win. Didn't see it being fully loaded.