Sunday, May 5, 2024
34
rated 0 times [  34] [ 0]  / answers: 1 / hits: 69115  / 2 Years ago, sat, september 3, 2022, 11:35:18

I want a command to shred completely the contents of a folder/directory (which may be inside folders/directories).
Also please explain the command.


More From » command-line

 Answers
4

  1. Install the package secure-delete.

  2. Use the command srm -r pathname to remove your folder and files.



The default settings are for 38 (!!!) passes of overwrites which is extreme overkill imho (see more info about this here).



For my usage, I only want a single pass of random data so I use srm -rfll pathname.



If you want to create a right-click option in the GUI for files and folders, use gnome-actions to call a script like this:



#!/bin/bash
if dialog=`zenity --window-icon=warning --question --title="Secure Delete" --no-wrap --text="Are you sure you want to securely delete:

$1

and any other files and folders selected? File data will be overwritten and cannot be recovered."`
then /usr/bin/srm -fllrv "$@"| zenity --progress --pulsate --text="File deletion in progress..." --title="Secure Delete" --auto-close
fi


If you want more paranoid settings be sure to modify the above script.


[#39260] Saturday, September 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
naldis

Total Points: 257
Total Questions: 101
Total Answers: 111

Location: Kenya
Member since Sat, Feb 25, 2023
1 Year ago
naldis questions
;