Bung the find statement into a script and get cron to execute it on a regular basis. There's no point reinventing the wheel, unless you're Microsoft, of course! Cheers.
warning .... don't do that in roots crontab!
many many things can break if you do that command with the wrong starting path.
if you know that none of the zero byte files are needed for anything as a flag or a FIFO pipe then you could use something like
find . -level 0 -size 0 -type f -exec rm {} \;
(you might have to replace level with depth depending on which unix you are using)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.