crystal_of
of: Overwrite Files
1. Purpose
This program securely overwrites existing files in a directory, including all of its nested sub directories.
Before you sell your computer or give it to another person or give back your work computer to the company when you quit a job, you must securely delete your important personal files. Deleting or overwriting a file once is not secured enough. Anybody can use appropriate tools to recover the original file's content.
This script overwrites the files 20 times with random strings. Nobody can recover the original contents of the files.
2. Prerequisites
Pre-built executable files
Clone the repo crystal_of, then look into the directory build to see if there are executable files for your OS. If the there is no executable files for your OS, you have to build them from source.
Build from source
In order to build from source, you must have Crystal compiler installed on your computer.
Verify whether Crystal is installed:
-
Open terminal.
-
Type
crystal -v, if you have Crystal installed on your machine, you should see something similar to this:
Crystal 1.19.1 (2026-01-20)
LLVM: 22.1.2
(The crystal version on your machine might be different.)
If you don't have Crystal installed on your machine, search "How to download and install Crystal" to find a way to install Crystal on your machine.
Build executable file
-
Download all the files
*.crto your machine. -
Open terminal.
-
Change the directory to where you save the files
of.cr. -
Run the command:
crystal build of.cr -o <PATH TO THE DIRECTORY TO STORE EXECUTABLE FILES>
You can also omit the output path, to compile the executable file to the current directory:
crystal build of.cr
3. Run the program
-
Open terminal.
-
Change the directory to where you save the executable files.
-
Run the command:
of <PATH TO THE DIRECTORY TO OVERWRITE FILES>
Example:
of $HOME/test_of
After running the program, you can check the file error_log.txt for any errors happening during the overwriting process.
crystal_of
- 0
- 0
- 0
- 0
- 0
- about 3 hours ago
- March 31, 2026
MIT License
Tue, 31 Mar 2026 19:09:26 GMT