2014-02-10 15:44:02 -08:00
|
|
|
# srm
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Securely remove files or directories.
|
2016-01-20 03:42:47 -08:00
|
|
|
> Overwrites the existing data one or multiple times. Drop in replacement for rm.
|
2020-10-28 18:19:43 +01:00
|
|
|
> More information: <http://srm.sourceforge.net/srm.html>.
|
2014-02-10 15:44:02 -08:00
|
|
|
|
2016-01-20 09:59:42 -08:00
|
|
|
- Remove a file after a single-pass overwriting with random data:
|
2014-02-10 15:44:02 -08:00
|
|
|
|
2020-10-28 18:19:43 +01:00
|
|
|
`srm -s {{path/to/file}}`
|
2016-01-20 03:42:47 -08:00
|
|
|
|
2016-01-20 09:59:42 -08:00
|
|
|
- Remove a file after seven passes of overwriting with random data:
|
2016-01-20 03:42:47 -08:00
|
|
|
|
2020-10-28 18:19:43 +01:00
|
|
|
`srm -m {{path/to/file}}`
|
2014-02-10 15:44:02 -08:00
|
|
|
|
2016-01-20 09:59:42 -08:00
|
|
|
- Recursively remove a directory and its contents overwriting each file with a single-pass of random data:
|
2014-02-10 15:44:02 -08:00
|
|
|
|
2020-10-28 18:19:43 +01:00
|
|
|
`srm -r -s {{path/to/directory}}`
|
2014-02-10 15:44:02 -08:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Prompt before every removal:
|
2014-02-10 15:44:02 -08:00
|
|
|
|
2015-10-28 14:03:06 +05:30
|
|
|
`srm -i {{\*}}`
|