On Fri, 28 Sep 2018, Greg Woods wrote:
When an existing file is truncated, which the shell does when you use stdout redirection, all the blocks that were in it have to be moved to the file system's free block list. Exactly what happens there may depend on what kind of file system you are using, but it is extra work that doesn't have to be done if you are creating a new file, which may explain the time difference.
Thanks, that makes sense. Any idea of why unlink()ing the file seems to be faster than truncating it?
Dave -- Dave Ulrick d-ulrick@xxxxxxxxxxx _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx