Linux Commands Examples

A great documentation place for Linux commands


query the ucf database


 usage: ucfq [options] (/path/to/file|package)[/path/to/file|package  ...]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !


This script takes a set of arguments, each of which is a package name (and thus does not contain a /) or a full path to a configuration file, and outputs the associated package, if any, if the file exists on disk, and whether it has been modified by the user. The output is either a human readable tabular form, or a compact colon-separated machine friendly format.

This script can potentially be used in package "postrm" scripts during purge to query the system for configuration files that may still exist on the system, and whether these files have been locally modified by the user -- assuming that the package registered all the configuration files with ucf using "ucfr".


--help h Print out a usage message.
--debug -d
Turn on debugging mode.
--verbose -v
Make the script more verbose..
--with-colons -w

Normally, the script presents the information in a human readable tabular format, but that may be harder for a machine to parse. With this option, the output is a compact, colon separated line, with no dividers, headers, or footer.

--state-dr dir

Set the state directory to "/path/to/dir" instead of the default "/var/lib/ucf". Used mostly for testing.


This is very inchoate, at the moment, and needs testing.

copyright and license

This script is a part of the Ucf package, and is

Copyright (c) 2006 Manoj Srivastava <srivasta\[:at:]debian[:dot:]org>

This program is free software; you can redistribute it and / or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


None Known so far.


Manoj Srivastava <srivasta\[:at:]debian[:dot:]org>

How can this site be more helpful to YOU ?

give  feedback