Coder Social home page Coder Social logo

orloffv / filesystemcrawler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emzola/filesystemcrawler

0.0 0.0 0.0 26 KB

A file system crawler application which crawls into file system directories looking for files which match a given criteria and executes actions.

Go 100.00%

filesystemcrawler's Introduction

File System Crawler

A file system crawler command-line tool which crawls into file system directories looking for specific files. It has the following features:

  • Finds files based on criteria like size, modified date and file extension
  • Lists files
  • Compresses files (in .gz format) before delete. Files are archived relative to source directory path
  • Deletes files
  • Logs deleted files to a log file

Attention!

Be careful when trying this tool on your system. The files will be deleted without any prompt or user confirmation. Never run this tool as a privileged user such as root or Administrator because it can cause irreversible damage to your system.

Usage

List all files in directory (e.g. /tmp/dir)

-root /tmp/dir/ -list

List only .log files in directory

-root /tmp/dir/ -ext .log -list

List .log or .txt files in directory

-root /tmp/dir/ -ext .log|.txt -list

List any file large than 20MB

-root /tmp/dir/ -size 20 -list

List only .gz or .pdf files modifed after 10 March 2023

-root /tmp/dir/ -date 2023-Mar-10 -ext .gz|.pdf -list

Delete all .txt files in directory

-root /tmp/dir/ -ext .txt -del

Log .pdf file to deleted_files.log before delete

-root /tmp/dir/ -ext .pdf -log deleted_files.log -del

Archive .txt file to another directory (e.g. /dir_archive) before delete

-root /tmp/dir/ -ext .txt -log deleted_files.log -archive /dir_archive -del

filesystemcrawler's People

Contributors

emzola 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.