https://github.com/jojiiofficial/shred
Shredder some files
https://github.com/jojiiofficial/shred
golang golang-module library shredder shredding-files
Last synced: 24 days ago
JSON representation
Shredder some files
- Host: GitHub
- URL: https://github.com/jojiiofficial/shred
- Owner: JojiiOfficial
- Created: 2020-04-01T16:06:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T12:58:22.000Z (about 6 years ago)
- Last Synced: 2024-06-20T13:31:33.585Z (about 2 years ago)
- Topics: golang, golang-module, library, shredder, shredding-files
- Language: Go
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shred
Package shred is a golang library to mimic the functionality of the linux `shred` command
## Usage
```golang
package main
import (
"github.com/JojiiOfficial/shred"
)
func main(){
shredder := shred.Shredder{}
shredconf := shred.NewShredderConf(&shredder, shred.WriteRand|shred.WriteZeros, 1, false)
shredconf.ShredFile("./10k")
shredconf.ShredDir("./toShredDir")
}
```
### Bench
Those results depend on you hardware (cpu, memory, HardDrive)!
BigFile: 1G
Normalfile: 4k
```bash
goos: linux
goarch: amd64
pkg: github.com/JojiiOfficial/shred
BenchmarkShredderSecure-12 33700 41533 ns/op 10096 B/op 11 allocs/op
BenchmarkShredder-12 27094 41833 ns/op 10096 B/op 11 allocs/op
BenchmarkShredderBigSecure-12 1 1723832805 ns/op 10104 B/op 11 allocs/op
BenchmarkShredderBig-12 1 2142966496 ns/op 10104 B/op 11 allocs/op
PASS
ok github.com/JojiiOfficial/shred 7.213s
```