On our system we generate a large number of temporary files every day, and at the end of the day, we remove them. Except lately, the number of files has grown to be quite long, so the remove command we are executing is failing, as shown below:
I am planning to change to the following method of removing these files:
I have tested this and it works fine, but my question is, is there a better way to do this? I don't have any reason to suspect otherwise, but just thought I'd check with this community to make sure I am not going to run into any unforeseen issues.
Code what you mean,
and mean what you code!
But by all means post your code!
Razalas
Code:
$ rm RECPT-ZONE*
-bash: /bin/rm: Argument list too long
I am planning to change to the following method of removing these files:
Code:
find . -name "RECPT-ZONE*" -exec rm -f {} \;
I have tested this and it works fine, but my question is, is there a better way to do this? I don't have any reason to suspect otherwise, but just thought I'd check with this community to make sure I am not going to run into any unforeseen issues.
Code what you mean,
and mean what you code!
But by all means post your code!
Razalas