@Lewis,
Yes, you absolutely correct, using the shred command is a standard method for securely deleting files on Linux systems, as it overwrites the file’s content before deleting it, making it more challenging for data recovery tools to retrieve the original information.
]]>I would use logrotate for this.
https://www.tecmint.com/install-logrotate-to-manage-log-rotation-in-linux/
]]>Doesn’t work when you want to preserve any of the file’s attributes, >file is just better.
]]>$ rm access.log $ touch access.log
Yes, it is two commands, but you cannot beat the conceptual simplicity and not need to memorize any special syntax. It is pretty good out-of-the-box thinking :-)
]]>