Small Mosaic


Categories:

/books
/career
/codinghorrors
/events
/geekstuff
/justdont
/languages
/languages/bash
/linkshot
/magazines
/meta
/misctech
/movies
/nottech
/operatingsystems
/operatingsystems/linux
/operatingsystems/linux/debian
/operatingsystems/solaris
/perl
/presentations
/programming
/python
/ruby
/security
/security/apache
/security/tools
/serversmells
/services
/services/dns
/sites
/specifications
/sysadmin
/testing
/tools
/tools/commandline
/tools/firefox
/tools/gui
/tools/network
/tools/online
/tools/online/greasemonkey
/tools/puppet
/unixdaemon

Archives:

July 20111
June 20112
May 20113
April 20112
March 20117
January 20111
December 20103
November 20103
August 20101
July 20101
June 20104
May 20102
April 20101
March 20108
February 20101
January 20102
Full Archives

Fri, 18 Mar 2005

Which package owns this file?
Filepkg.sh is another one of those scripts borne of a personal itch. I'm spending a fair amount of time cleaning up both Redhat and Debian boxes which have custom software installed, some of it by hand and some via the package management system (we build the packages ourselves).

One of the annoyances I've come across while determining which files are managed and which were left by us is that while both dpkg and rpm will tell you the package that owns a file, you need to provide the full path of the file you're asking about to get the information out. Well no more!

filepkg.sh takes a file name as an argument and tries to do a 'which' command on it. If this works then the full path is passed to the native package manager (filepkg.sh currently supports Redhat and Debian) and the owning package, if there is one, is returned. If filepkg.sh is called with a '-l' as the first argument or 'which' doesn't find a file with that name ('which' doesn't deal with config files for example) then the file is passed to 'locate'; it then looks up the file and passes it to the package manager to get a package name back.

The idea is simple, the code's easy to read and it works how I want it so feel free to do what you want with this little chunk of GPL'd code.

Like this post? - Digg Me! | Add to del.icio.us! | reddit this!

Posted: 2005/03/18 00:22 | /unixdaemon | Permanent link to this entry | This entry and same date


Updating my Pragmatic Investment Plan -- 2005/03
I've finally found the time to do make some updates to my 2004 - 2005 Pragmatic Investment Plan. I've posted links to some books reviews, added two technical conferences and listed some scripts that have been down-loaded a fair few times from my site (over 50 downloads was my requirement).

While I'm not even half way through the PiP yet (and time's a ticking!) I've started to think about the 2005-2006 version. I think I might include a challenge to build and provide content for a website that pays for itself (including hosting). That seems to be a more solid target than get X page impressions. I'll also up the number of people that have to use a piece of software before I consider it useful; raising it from 50 to 250 might be a challenge.

One thing I won't be including next year is the language of the year. My employment circumstances have changed a fair bit since I wrote the current version of the PiP and I'm doing a lot less development now. This makes spending enough time to get really comfortable with a language extremely hard.

Like this post? - Digg Me! | Add to del.icio.us! | reddit this!

Posted: 2005/03/18 00:06 | /unixdaemon | Permanent link to this entry | This entry and same date


books career codinghorrors events geekstuff justdont magazines meta misctech movies nottech operatingsystems/linux operatingsystems/linux/debian operatingsystems/solaris perl programming python ruby security security/apache security/tools serversmells services/dns sites sysadmin testing tools tools/commandline tools/firefox tools/gui tools/network tools/online tools/online/greasemonkey tools/puppet unixdaemon

Copyright © 2000-2010 Dean Wilson XML feed logo