Hi
I have a problem running one of my script.
This commands end in error:
find /tmp -mtime +7 | xargs rm -fR
Some times we have many files in /tmp, the command gives error: 0403-027 The parameter list is too long.
How can i avoid this.
I can not reduce mtime because the files is often generated the same day.
The only way I have managed to do it is:
find /tmp/a* -mtime +7 | xargs rm -fR
find /tmp/b* -mtime +7 | xargs rm -fR
.
.
find /tmp/z* -mtime +7 | xargs rm -fR
Can this be done better ?
Thanks in advance.
/HGA
I have a problem running one of my script.
This commands end in error:
find /tmp -mtime +7 | xargs rm -fR
Some times we have many files in /tmp, the command gives error: 0403-027 The parameter list is too long.
How can i avoid this.
I can not reduce mtime because the files is often generated the same day.
The only way I have managed to do it is:
find /tmp/a* -mtime +7 | xargs rm -fR
find /tmp/b* -mtime +7 | xargs rm -fR
.
.
find /tmp/z* -mtime +7 | xargs rm -fR
Can this be done better ?
Thanks in advance.
/HGA