An open API service indexing awesome lists of open source software.

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

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
```