Code Monkey home page Code Monkey logo

cruft-ng's Introduction

cruft-ng, a rewrite of Debian 'cruft' engine

cruft-ng is a program to look over your system for anything that shouldn't be there, but is; or for anything that should be there, but isn't.

Flowchart

Cruft was built as a main shell scripts that spawn hundreds of helper processes (other shell scripts, perl programs, C programs).

This project attempts to keep all the main functionality in one process; while output remains 100% identical to cruft's one.

The new cpigs program included provides a more analytical interface: dump to .csv or viewing with ncdu tool.

More information: https://wiki.debian.org/Cruft

cruft-ng needs a ruleset:

  • /usr/libexec/explain/ : this is a set of shell scripts plugins for handling of special cases.

  • /usr/share/cruft/rules/* : these are glob-like files, quite like, but not totally the same than in your standard shell. This re-uses cruft' shellexp.c

    These can be moved into individual Debian package (or some proprietary .deb distro in my case) using dh-cruft.

DhCruft

  • /usr/share/cruft/ruleset : this is a fallback ruleset for packages not yet providing their own rules.

Some assumption differs:

  • We are not in 1998 anymore, this should not be a problem to keep 32 or 64mb of data in memory; so the intermediary spooling in /var/spool/cruft/ is un-needed; unless it is processed by external tools

  • Debian

  • cruft-ng used to use mlocate binary database instead of running 'find' on the whole file system, this way, it could also be setgid mlocate to be able to access the db and be run by any user; while cruft need to be run as root.

  • PS: nowadays mlocate has been replaced by plocate. The new binary database is in a private format without a promise of stability, so cruft-ng simply calls ou the plocate binary. This means it can run as non-root and mostly gives the same results. It of course can not list files only root can see.

  • cruft scan /home with find twice, only to detect files not owned by /home/$user & broken symlinks; cruft-ng never scan /home (cruft also give false positives for files created/deleted between the two 'find' runs)

TODO:

COPYRIGHT:

This is licensed GPL-2+, as cruft itself. This reuses shellexp.c, explain/* and filters-unex/* from cruft.

1998-2000 Anthony Towns 2005-2011 Marcin Owsiany 2014-2022 Alexandre Detiste

cruft-ng's People

Contributors

a-detiste avatar nicolasjamar avatar cgzones avatar guillemj avatar debian-janitor avatar adrianheine avatar edwardbetts avatar shea690901 avatar

Watchers

James Cloos 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.