From: Angelo Arrifano <miknix@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [RFC][NEW] Utility to find orphaned files
Date: Sun, 25 Apr 2010 19:10:08 +0200 [thread overview]
Message-ID: <4BD47770.8050308@gentoo.org> (raw)
In-Reply-To: <20100425103426.66855395@xdune.lan>
On 25-04-2010 17:34, Yuri Vasilevski wrote:
> Hello,
>
> On Sun, 25 Apr 2010 13:18:25 +0200
> Angelo Arrifano <miknix@gentoo.org> wrote:
>
>> Hello developers developers and developers,
>>
>> Ever wondered how much crap is left in your X-years old Gentoo box?
>>
>> I just developed a python utility to efficiently find orphaned files
>> in the system. By orphaned files I mean the files that are present on
>> system directories and don't belong to any installed package.
>>
>> The package builds a virtual filesystem (cache) on the RAM using
>> python hash tables. Then it uses the cache to find the ownership of
>> files inside user-specified dirs.
>>
>> Building the cache takes less than 10 seconds here in a system with
>> 1366 installed packages.
>>
>> This is not intended to be a finished program yet, I'm looking forward
>> for your constructive commentaries.
>
> There is a tool that does that, qfile from app-portage/portage-utils.
> Check the "-o, --orphans * List orphan files" option.
>
> It's not as straight forward as it could be, as it checks only for
> files specified as arguments or read from file.
>
> But you can trivially use it like:
> # find /dir/you/want/to/check/for/orphans | qfile -o -f -
>
> Best,
> Yuri.
>
Based on the comments so far, I'll try to make my PoC a better tool.
My primary objective is to make this some kind of disk cleanup utility
for Gentoo boxens. I don't expect Gentoo systems to be *that* polluted
but sometimes we all have to do ugly things to fix broken systems real
fast. - If you know what I mean.
There are other things that came to my mind, like using stored hashes to
check the system files integrity (as in security).
My next steps in regard to this utility will be:
* Follow harring suggestion and use available PM API.
* Make the application handle symlinks so we start getting a more
informative output.
* To store the generated cache on disk and to only regenerate it if needed.
Regards,
- Angelo
next prev parent reply other threads:[~2010-04-25 17:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-25 11:18 [gentoo-dev] [RFC][NEW] Utility to find orphaned files Angelo Arrifano
2010-04-25 11:45 ` Brian Harring
2010-04-25 13:43 ` Daniel Pielmeier
2010-04-30 16:24 ` Enrico Weigelt
2010-05-03 13:34 ` [gentoo-dev] " Peter Hjalmarsson
2010-05-11 13:08 ` Angelo Arrifano
2010-04-25 15:34 ` [gentoo-dev] " Yuri Vasilevski
2010-04-25 17:10 ` Angelo Arrifano [this message]
2010-04-25 17:43 ` Benedikt Böhm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BD47770.8050308@gentoo.org \
--to=miknix@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox