From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1O63qt-0002wb-Kw for garchives@archives.gentoo.org; Sun, 25 Apr 2010 15:34:35 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED441E095A; Sun, 25 Apr 2010 15:34:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0DAD2E093B for ; Sun, 25 Apr 2010 15:34:26 +0000 (UTC) Received: from xdune.lan (unknown [189.140.149.30]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 5BCD81B4030 for ; Sun, 25 Apr 2010 15:34:25 +0000 (UTC) Date: Sun, 25 Apr 2010 10:34:26 -0500 From: Yuri Vasilevski To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [RFC][NEW] Utility to find orphaned files Message-ID: <20100425103426.66855395@xdune.lan> In-Reply-To: <4BD42501.9070505@gentoo.org> References: <4BD42501.9070505@gentoo.org> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.0; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 47e1a773-7545-40e6-be02-fb453fc9edad X-Archives-Hash: 3c84a5c308e9b7831e469b66fdbfcfb3 Hello, On Sun, 25 Apr 2010 13:18:25 +0200 Angelo Arrifano 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.