Rearranging from delete-tool to root folder
parent
197f046910
commit
57312b10df
30
README.md
30
README.md
|
@ -1,13 +1,33 @@
|
|||
# Some Fancy Tools 🛠
|
||||
# Delete Tool
|
||||
|
||||
This repository contains tools which can be used whenever needed. Some of them
|
||||
are tested and some of them are not so use it after testing it before using in
|
||||
production.
|
||||
This is just for deleting large number of files from a particular path with a prefix.
|
||||
|
||||
# Introduction
|
||||
|
||||
## Delete Tool
|
||||
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
|
||||
|
||||
```
|
||||
Usage of ./delete-tool:
|
||||
-path string
|
||||
Path to delete from
|
||||
-prefix string
|
||||
Delete files with prefix
|
||||
```
|
||||
|
||||
Following command will delete everything that matches `/var/log/application/all-logs.log.*`
|
||||
|
||||
```sh
|
||||
./delete-tool -path /var/log/application -prefix all-logs.log.
|
||||
```
|
||||
|
||||
# LICENSE
|
||||
|
||||
MIT
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
# Delete Tool
|
||||
|
||||
This is just for deleting large number of files from a particular path with a prefix.
|
||||
|
||||
# Introduction
|
||||
|
||||
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.
|
||||
|
||||
# Usage
|
||||
|
||||
```
|
||||
Usage of ./delete-tool:
|
||||
-path string
|
||||
Path to delete from
|
||||
-prefix string
|
||||
Delete files with prefix
|
||||
```
|
||||
|
||||
Following command will delete everything that matches `/var/log/application/all-logs.log.*`
|
||||
|
||||
```sh
|
||||
./delete-tool -path /var/log/application -prefix all-logs.log.
|
||||
```
|
||||
|
||||
# LICENSE
|
||||
|
||||
MIT
|
Loading…
Reference in New Issue