Giter VIP home page Giter VIP logo

filecleanup's Introduction

FileCleanup

Introduction

FileCleanup CLI is a command-line tool designed to help you manage and maintain your file system by automating the cleanup of unnecessary files and folders. With its flexible configuration options, FileCleanup CLI allows you to define rules for deleting files based on criteria such as retention period, folder size limits, and interval-based deletion.

Key Features:

  • Flexible Configuration: Define cleanup rules using a JSON configuration file, allowing you to specify target folders, retention periods, delete intervals, maximum folder sizes, and more.
  • Automatic Cleanup: Schedule automatic file cleanup tasks based on your defined rules and intervals, reducing manual intervention and ensuring your file system stays organized and efficient.
  • Detailed Logging: Optionally enable detailed logging to track cleanup operations, providing visibility into deleted files, cleanup actions, and any errors encountered during the process.
  • Customizable Policies: Tailor cleanup policies to suit your specific requirements, whether you need to enforce strict retention periods, limit folder sizes, or optimize disk space usage.
  • Easy Integration: Seamlessly integrate FileCleanup CLI into your existing workflows or scheduled tasks, making it easy to incorporate automated file cleanup into your system maintenance routines.

Getting Started

FileClieanCli generates its configueation upon its first running.
Running go run main.go or fileCleanup will produce the configuration file at the following location:

  • windows: C:/windows/$USER/.fileCleanup/fileCleanup.json
  • linux: /home/$USER/.fileCleanup/fileCleanup.json

It is possible to alter the configuration path by utilizing the -f flag to access a custom configuration file.

FileGenerator

This repo has a file generator to test the behaviour of the file cleanup.
Simple edit FileGenerator with the desired # of files, file size, buffer and target folder.
Simply run

go run fileGenerator/main.go

Example:

go run fileGenerator/main.go
Starting IO benchmark on Samsung SSD 990 Pro...
Disk type: Samsung SSD 990 Pro
Total operation Read, Write, Delete in seconds 0.3285541
Number of files: 10
File size: (KB) 10240
Total File size: (MB)  100
Average Write Speed (MB/s): 786.0251024976733
Total Write time in seconds: 0.1272224
Average Read Speed (MB/s): 2369.2191053828656
Total Read time in seconds: 0.042208
Average Delete Speed (MB/s): 15039.177056231481
Total Delete time in seconds: 0.0066493
Average Write IOPS: 201222.42623940436
Average Read IOPS: 606520.0909780136
Average Delete IOPS: 1503.9177056231483
Average CPU Time (s): 0.01272224
Average Delete CPU Time (s): 0.00066493
Average Memory Usage (bytes): 1.6961382113821135


Starting IO benchmark on Seagate Barracuda ST2000DM008...
Disk type: Seagate Barracuda ST2000DM008
Total operation Read, Write, Delete in seconds 7.9552990999999995
Number of files: 10
File size: (KB) 10240
Total File size: (MB)  100
Average Write Speed (MB/s): 12.88686414488691
Total Write time in seconds: 7.7598397
Average Read Speed (MB/s): 1403.4890738375602
Total Read time in seconds: 0.071251
Average Delete Speed (MB/s): 10403.012712481534
Total Delete time in seconds: 0.0096126
Average Write IOPS: 3299.037221091049
Average Read IOPS: 359293.2029024154
Average Delete IOPS: 1040.3012712481534
Average CPU Time (s): 0.77598397
Average Delete CPU Time (s): 0.0009612599999999999
Average Memory Usage (bytes): 1.335813492063492

filecleanup's People

Contributors

moshpe avatar mosheperet avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.