I have the following command which deletes files that are one day old and that are of mp3 file type.
find /home/get/public_html/audio -daystart -maxdepth 1 -mtime +1 -type f -name '*.mp3' |xargs rm -f
The problem with this is when I run it, it sometimes says,
‘fork’: resource xargs not available.
Does this mean this command first finds the file and then starts many process to delete each file?
How can I (when a file is found) immediately delete it rather than it being piped to xargs?
I can’t use that -delete (‘invalid predicate’).
what about trying:
find /home/get/public_html/audio -daystart -maxdepth 1 -mtime +1 -type f -name '*.mp3' -exec rm -f {} \;