Run the main.go program with the Shred tool for a sample file called "sensitive.txt".
- Valid path to a file that contains data - should overwrite and delete the file.
- Valid path to an empty file - should still perform overwrites and then delete.
- Invalid path or non-existent file - should return an error.
- Path to a directory instead of a file - should return an error.
- Files with different sizes - to check how the function behaves with different sized files.
- File with read-only permissions - should return an error.
- File which is already being used - should return an error.
- Shred a file which has a valid path and data - should overwrite and delete the file
- Shred a file which has invalid path or non-existent file - should return an error
- Shred a file with read-only permissions - should return an error
- Shred a file which is already being used
This tool can be used when:
- Ensuring sensitive data is deleted to prevent easy recovery.
- Clearing storage space while making sure prior data remains hard to retrieve.
- The Shred tool enhances security measures when deleting files.
- The Shred tool utilizes cryptographic random numbers for overwriting content.
- Tripling overwrites may not adequately secure highly sensitive data; certain standards suggest numerous passes using diverse data patterns.
- Mismanages files larger than 1024 bytes, only addressing the initial 1024 bytes and neglecting the remainder.
- File systems using wear-leveling (e.g., certain SSDs) may not target the exact physical storage sectors, risking the preservation of the initial data.
- Simply erasing a file doesn't confirm its removal from backups, cloud synchronizations, or other duplicate locations.
- The process can be slow for larger files because of repeated overwriting cycles.