https://github.com/mstill3/secure-delete
Script that securely removes files/directories on Linux & MacOS
https://github.com/mstill3/secure-delete
cli linux macos rm secure shell
Last synced: about 2 months ago
JSON representation
Script that securely removes files/directories on Linux & MacOS
- Host: GitHub
- URL: https://github.com/mstill3/secure-delete
- Owner: mstill3
- Created: 2026-01-24T19:17:29.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-24T19:44:59.000Z (5 months ago)
- Last Synced: 2026-01-25T08:35:13.550Z (5 months ago)
- Topics: cli, linux, macos, rm, secure, shell
- Language: Shell
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# secure-delete
## Overview
This script securely deletes files and directories on linux and macOS by overwriting them multiple times with random data, making recovery nearly impossible.
## Features
- Securely deletes files and directories
- Allows specified number of overwrite iterations (default is 3)
- Handles both files and directories, including recursion for directories
## Pre-requisties
- linux / macOS
- bash
- parallel cli command
- depending on data permissions may need to run as sudo
## Usage
```bash
# Securely delete a file
./secure-delete junk_file.txt
# Securely delete a file with 5 overwrite iterations
./secure-delete junk_file.txt -n 5
# or
./secure-delete junk_file.txt --iterations 5
# Securely delete a directory
./secure-delete junk_dir
# Securely delete a directory with 5 overwrite iterations
./secure-delete junk_dir -n 5
# or
./secure-delete junk_dir --iterations 5
# Show script usage
./secure-delete --help
```