using find and deleting a lot of data
Say we have a 1TB directory and we want to use 'find' to delete anything older than 1 day. Which command would finish quicker?
find . -type f -mtime +1 | xargs rm -f
find . -type f -mtime +1 -delete
I just learned about the '-delete' argument for "find" today. Obviously, there are ways I can test this myself, but I'm curious as to if anyone else already knows the answer. I would think that since the first example has to pipe to xargs, it would be slower. But I am not sure.