Comments on: 5 Ways to Empty or Delete a Large File Content in Linux https://www.tecmint.com/empty-delete-file-content-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 27 Jul 2023 04:58:27 +0000 hourly 1 By: Ravi Saive https://www.tecmint.com/empty-delete-file-content-linux/comment-page-1/#comment-2039296 Thu, 27 Jul 2023 04:58:27 +0000 http://www.tecmint.com/?p=23653#comment-2039296 In reply to Lewis Cowles.

@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.

]]>
By: Lewis Cowles https://www.tecmint.com/empty-delete-file-content-linux/comment-page-1/#comment-2039106 Wed, 26 Jul 2023 22:16:10 +0000 http://www.tecmint.com/?p=23653#comment-2039106 Just use shred command to securely delete files in Linux.

]]>
By: Florian https://www.tecmint.com/empty-delete-file-content-linux/comment-page-1/#comment-1974684 Wed, 01 Mar 2023 06:48:24 +0000 http://www.tecmint.com/?p=23653#comment-1974684 In reply to Shujauddin Qureshi.

I would use logrotate for this.

https://www.tecmint.com/install-logrotate-to-manage-log-rotation-in-linux/

]]>
By: alex https://www.tecmint.com/empty-delete-file-content-linux/comment-page-1/#comment-1973866 Mon, 27 Feb 2023 22:00:24 +0000 http://www.tecmint.com/?p=23653#comment-1973866 In reply to Gwen Broderick.

Doesn’t work when you want to preserve any of the file’s attributes, >file is just better.

]]>
By: Gwen Broderick https://www.tecmint.com/empty-delete-file-content-linux/comment-page-1/#comment-1892050 Wed, 05 Oct 2022 14:24:12 +0000 http://www.tecmint.com/?p=23653#comment-1892050 I have yet another alternative for you:

$ 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 :-)

]]>