Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   dpkg-query -W -f='${Conffiles} ' | grep obsolete (http://www.linux-archive.org/debian-user/280436-dpkg-query-w-f-conffiles-grep-obsolete.html)

11-14-2009 03:44 PM

dpkg-query -W -f='${Conffiles} ' | grep obsolete
 
Hi,

is it true that this call `dpkg-query -W -f='${Conffiles}
' | grep obsolete` show all obsolate files which can be removed ?

I read about this at http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot while upgrading sysv-rc for dependency booting.

My script to detect obsolate files is:
---8<---8<---8<---8<---8<---8<---8<---8<
#!/bin/sh

tmpf=`tempfile`

trap "rm $tmpf" EXIT QUIT

dpkg-query -W -f='${Conffiles}
' | grep obsolete | sed -e 's,[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+).*,2 1,g' |md5sum -c 2>/dev/null| grep ": OK$" | sed -e 's,: OK$,,g' >"$tmpf"
vi "$tmpf"
---8<---8<---8<---8<---8<---8<---8<---8<

Greetings,
Raphael


All times are GMT. The time now is 05:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.