We have a server with an excessively large /var/spool/clientmqueue. I am trying to clear this out. The technique I tried was:
This command exhibits behaviour that I was not expecting. I anticipated that this would remove files as find encountered them. This does not seem to be the case. There was an interruption due to a network error and when I checked the directory size it had not changed although the find had been running for a significant amount of time.
I then used this command to see what was going on:
This command eventually, after a very, very long time, began to request permission to delete files. The problem is that it took an extraordinary length of time before it began the delete process. I had previously believed that
Code:
find /var/spool/clientmqueue -type f -exec rm -f {} \;
This command exhibits behaviour that I was not expecting. I anticipated that this would remove files as find encountered them. This does not seem to be the case. There was an interruption due to a network error and when I checked the directory size it had not changed although the find had been running for a significant amount of time.
I then used this command to see what was going on:
Code:
find /var/spool/clientmqueue -type f -ok rm {} \;
This command eventually, after a very, very long time, began to request permission to delete files. The problem is that it took an extraordinary length of time before it began the delete process. I had previously believed that
find
acted upon files as it encountered them. I therefore expected the first confirmation request to be nearly instantaneous. Either my belief is unfounded or something else is going on. Does not find
execute as it encounters qualified files? If so then what is causing the inordinate delay. If not then is there a utility that does exactly that?