mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-08-27 18:30:24 +02:00
Update README.md
This commit is contained in:
@@ -1613,10 +1613,9 @@ shred -z foobar.txt
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
## SHRED without shred command
|
## SHRED without shred command
|
||||||
shred()
|
shred() {
|
||||||
{
|
|
||||||
[[ -z $1 || ! -f "$1" ]] && { echo >&2 "shred [FILE]"; return 255; }
|
[[ -z $1 || ! -f "$1" ]] && { echo >&2 "shred [FILE]"; return 255; }
|
||||||
dd bs=1k count=$(du -sk ${1:?} | cut -f1) if=/dev/urandom >"$1"
|
dd status=none bs=1k count=$(du -sk ${1:?} | cut -f1) if=/dev/urandom >"$1"
|
||||||
rm -f "${1:?}"
|
rm -f "${1:?}"
|
||||||
}
|
}
|
||||||
shred foobar.txt
|
shred foobar.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user