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.
|
2024-10-12 10:02:00 +02:00
|
|
|
> More information: <https://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
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`srm {{[-s|--simple]}} {{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
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`srm {{[-r|--recursive]}} {{[-s|--simple]}} {{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
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`srm {{[-i|--interactive]}} {{\*}}`
|