# The KFind Handbook

Miroslav
Flídr

    flidr@kky.zcu.cz

Martin
Hartig

    hartig@mathematik.uni-kl.de

Mark
Roberts

    mar2@scigen.co.uk

Version 0.4, 21 June 1998

This Handbook describes KFind Version 0.4

The KFind Handbook

KDE
KFind
File searching

## Introduction

Kfind looks for files matching search criteria within a directory hierarchy.

Often you know that a file is 'out there somewhere', but you can't remember where it is, even with a good effort. So KFind is exactly the tool for that problem. Having found the required file(s), you can:

- save them,

- delete them,

- change their file properties,

- store them to archives and/or

- open the directory containing the file(s) in the file manager (Kfm).

I hope you find this program useful and I would appreciate any suggestions and comments.

`Miroslav Flídr` flidr@kky.zcu.cz.

## Installation

### How to Obtain KFind

KFind is a part of the KDE project http://www.kde.org. KFind can be found on ftp://ftp.kde.org/pub/kde/, the main ftp site of the KDE project. There are links to many FTP mirrors there as well.

### Requirements

In order to successfully compile KFind, you need the latest versions of `libkdecore` and `libkfm`. All required libraries as well as KFind itself can be found on ftp://ftp.kde.org/pub/kde/.

### Compilation and installation

Kfind is normally an integrated part of a KDE release and therefore will be automatically installed with other KDE applications in the normal course of KDE installation.

If you need to compile and install KFind yourself on your system, type the following in the base directory of the KFind distribution:

    % ./configure
    % make
    % make install

Since KFind uses `autoconf`, you should not have trouble compiling it. Should you run into problems, please report them to the KDE mailing lists.

### Configuration

Configuration is normally performed by means of the Preferences dialog; see the user section of this manual for more details. A technical description of kfind configuration follows for interested parties:

Kfind reads configuration parameters from a configuration file (normally `˜/.kde/share/config/kfindrc`).

This file contains information about saving search results, available archivers and other configuration parameters; these parameters can be edited from the `Kfind` Preferences dialog.

General information: the resource file consists of sections. Each section is started by a header title in square braces e.g.`[Saving]`

Information following the header relates to a specific aspect of `Kfind` operation.

Saving configuration: The configuration file holds the filename and format of the file to be used for saving search results. These parameters are stored as follows:

    [Saving]
    Format=HTML
    Filename=/root/result.html

Where `Format` entry can have values `HTML` or `Plain Text`.

Archiver configuration: Archivers available for `kfind` are specified in kfindrc entry `[Archiver Types]` as follows:

    [Archiver Types]
    Archivers=tar;zip;zoo;

And each archiver is detaily described by its own entry:

    [tar]
    ExecOnCreate=tar cf %a -C %d %n
    ExecOnUpdate=tar uf %a -C %d %n
    Comment=Tar

The first line contains the command to be executed when creating a new archive and the second is for updating existing archives. The third one is the comment used for archiver description in Preferences dialog. Variables may be used in these commands, and are denoted by a leading &percnt; sign.

The following is a list of legal command line variables:

`&percnt;a` The complete name of the archive

`&percnt;f` The normal file name

`&percnt;d` The parent directory. If the given argument is a file ( not a directory ) then this will give you the directory this file is in.

`&percnt;n` The name of the file. If the given argument is a directory then this is the name of this directory.

## Onscreen Fundamentals

In this section will be briefly described Kfind user interface.

The Kfind window is separated into three areas: toolbar, search parameters dialog, and viewing area. The viewing area and statusbar are visible only after receiving search results.

### Toolbar

Start Search

  Starts new search using parameters specified in parameters dialog.

New Search

  Clears results and starts with new parameters.

Stop Search

  Stops running search process.

Open

  Asks Kfm to start default binding for selected file.

Add to Archive

  Adds selected file to chosen archive.

Delete

  Deletes selected files and asks Kfm to refresh directory.

Properties

  Shows properties of selected file.

Open Containing Folder

  Asks Kfm to open folder containing selected file.

Save Search Results

  Saves results to file specified in Options->Preferences dialog.

Help

  Shows KFind documentation.

Quit

  Exits KFind.

### Search Parameters Dialog

This dialog is the main part of `KFind`. It's used for specifying parameter for find utility. There are three find parameters groups:

Name and location

  This dialog is used to specify a filename to look for. This Filename is entered into combobox and can contain following wildcards:

  - ? matches any character

  - * matches any sequence of characters

  - &lsqb; ] matches a defines set of characters, e.g. &lsqb;a-zA-Z0-9] matches upper and lower case ASCII letters and digits.

  - \ sign is alphanumerical or a point

  The combo box stores names history. The Browse button is used to specify directory where the search will be performed. Whether the find should look into subdirectories is specified by Include subfolders check button.
Date Modified

  This dialog allows searching for files created or modified within a specified time period.

Advanced

  This dialog allows file searches for specific types of files e.g Postscript-documents, JPEG image files or WAV sound files.

### Viewing Area

The viewing area contains results of find process. After a file has been selected, the functions open, add to archive,delete, properties and open containing folder are enabled. Double clicking causes execution.

## The Menu Entries

### File

The following functions are available from the file menu:

Open

  This option calls kfm to open the currently selected file, using the default binding e.g Program files will be executed, text files will start the text editor, etc. This action can also be performed by double-clicking on the filename in the list.

Add to archive

  Adds the selected file to an archive.

Delete

  Deletes the selected file.

Properties

  Allows the properties of the selected file to be altered.

Open Containing Folder

  Opens the directory containing the selected file in a file manager (KFM) window

Save Search

  Saves the list of selected files

Quit

  Exit `Kfind`

### Edit

Entries in this menu are disabled.

### Options

From this menu you can start the preferences dialog. The first tab of the preferences dialog allows one to select the name and format of the file where search results are stored. The second tab shows available filetypes and archivers details.

Saving

  Specify the file name where the the search results are stored. The default is `.kfind-results.html` in the user's home directory. If another name is chosen, one can specify the format of the stored results. HTML and Text (.txt) are the currently supported formats.

Archivers

  This dialog allows viewing (and in the future, probably editing) of the archiver definitions used by Add to Archive function.

### Help

>Show information about KFind and KFind documentation.

## Epilog

### Developers

Miroslav Flídr

  E-Mail: flidr@kky.zcu.cz

Mario Weilguni;

  E-Mail: mweilguni@kde.org

### Authors

Miroslav Flídr

  E-Mail: flidr@kky.zcu.cz

Martin Hartig

  E-Mail: hartig@mathematik.uni-kl.de

Mark Roberts

  E-Mail: mar2@scigen.co.uk

Eric Bischoff

  - Editor E-mail: ebisch@cybercable.tm.fr