LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   script to auto delete files older than X days (https://www.linuxquestions.org/questions/programming-9/script-to-auto-delete-files-older-than-x-days-505942/)

bigearsbilly 12-06-2006 03:39 AM

I know what -f does, I was just testing, as per my quote,
whether -exec was much slower than | xargs.

Just thought someone may be interested.

matthewg42 12-06-2006 08:20 AM

The test isn't a very robust one. For a start it doesn't measure the time of xargs. There's also no way to eliminate the effects of other system load or caching like this.

Having said this, if you ignore the real time and look at the user and sys timings you get some idea. In this case the xargs looks a lot quicker, but then you're not adding the timings of the xargs operation.

I would guess that the system has slow (IDE?) IO. On machines with high performance IO the xargs method is generally quicker. Of course, the per-operation cost is different for different OSes. Linux actually has a very attractive process start overhead, so it's less noticable than on other *nixes.

bigearsbilly 12-06-2006 08:30 AM

? it measures the pipeline as a whole.

blimey it was only a silly test, don't take it seriously.

scsi on solaris 8.


All times are GMT -5. The time now is 03:10 AM.