No one even talked about saving the hash table.
I need to delete the items in real time. When I'm adding the data to the hash table, I have no idea that I'm going to remove it sometime and I have no idea which will be removed and when.
When I do decide to remove data, I say something like... lets remove all items which thier data contains the word Hello (just an example).
Your solution is badly coded.... you take a hash table, save it to a file, and scan it using a while loop, and delete the data from the file!!!!! This is the slowest way to do it.
I'm currently doing the same thing on the hash table itself using a while loop too, and it takes ages because of it. From expiriance, working with files is much slower and take more resources.
If it could be done without any While loops than it would takes few seconds at most.....