Delete files securely on Linux – Journaled file systems - Comment Page: 1

Few days ago I write about shred, which work fine for old systems, like EXT2, but not so nice with journaled file systems. Modern file systems need something more robust, like dd and srm (a secure replacement for rm). Unlike the standard rm, srm overwrites and rename the files before unlinking them. This makes it very hard to recovery of the data. Create test file: echo "secure content" > /tmp/secure.txt dd and srm command usage Fill free space with zeroes (Use very carefully): dd if=/dev/zero of=/tmp/secure.txt Write buffered data from the memory out to disk sync Delete file with srm: # Basic example srm /tmp/secure.txt # US Dod compliant 7-pass...

2 comments on “Delete files securely on Linux – Journaled file systems - Comment Page: 1

    1. How does srm, properly overcome the issues faced with a Journaling file system? Is this why you run the sync command?



      • Hi Kenneth,

        This guide does not provide absolutely secure way to remove files, I think that the only totally secure way to delete files permanently is overwrite whole disk, but this makes it harder to recover data. Sync command is used to flush file system buffers.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.