You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
||3 years ago|
|.editorconfig||3 years ago|
|LICENSE||3 years ago|
|README.md||3 years ago|
|main.go||3 years ago|
|main_test.go||3 years ago|
This is just for deleting large number of files from a particular path with a prefix.
This tool uses a simple
filepath.Walk function on a path provided and
performs a conditional delete if the file path inside it has prefix.
This came across to me when I wanted to delete a lot of files in a folder in parallel (or concurrently). Bash and Find commands can be used but they might not be as efficient as we cannot parallelize it properly without external tools and stuff.
Usage of ./delete-tool: -path string Path to delete from -prefix string Delete files with prefix
Following command will delete everything that matches
./delete-tool -path /var/log/application -prefix all-logs.log.