Skip to content

Instantly share code, notes, and snippets.

View hctilg's full-sized avatar
🌱
Studying for the entrance exam (Konkour)

Mahi hctilg

🌱
Studying for the entrance exam (Konkour)
View GitHub Profile
@hctilg
hctilg / secure_erase.sh
Created January 2, 2024 16:02 — forked from tavallaie/secure_erase.sh
**Secure Data Erasure Script (Bash)** This Bash script securely erases data from a specified device with random data, ensuring irrecoverability. Use with caution.
#!/bin/bash
# Check if the script is run with superuser privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root (sudo)."
exit 1
fi
# Prompt the user for the target devices
read -p "Enter the target devices (e.g., /dev/sdX /dev/sdY): " target_devices