Worker file manager

1. File search

This document gives an overview of how to use the search function in Worker.

1.1. Introduction

The search command can do the usual stuff like searching for file patterns and/or file content but also supports some additional features described below. You can enter any start directory, enter a file pattern to match names with and optionally search the content of files.

Features:

Tips:

1.2. Search parameters

1.2.1. Basic options

The top area of the search window contains the search parameters. Most of them should be fairly descriptive but here are some details:
  1. Start directory
    You can enter a single dot or leave it empty if you want to start the search in the current directory.
    The text field is invisible if search results are available which will be used for further results.
  2. File name
    Using the default settings you can enter shell-like patterns using an asterisk as a placeholder for an arbitrary string. You can select the option "Use regular expression" if you want to use regular expressions for more sophisticated patterns.
    You can also choose to match the complete file name including the path by selecting the corresponding option.
    A separator character can be used to match multiple file names and the character can be changed as well if it collides with the actual file name pattern. By default it is a comma, but if the file name contains commas, you might want to enter a different character or leave it empty to not use any separator.
  3. File content
    If not empty the search also checks the content of the files accordingly the regular expression entered here. The list of results will then also contain the exact line number in which the entered string was found.
  4. Match expression
    This feature allows to use C-like expressions to create more complex expressions, for example to match different content strings in the same file.
    The expression can be entered or interactively constructed by clicking on the buttons below the text field (which is also automatically updated with the next possible values).
    Expressions can be combined with file name patterns and file content matches in which case all three conditions must match.
    These expressions can be used to construct the complete expression:
    • name: A file name pattern similar to the separate file name pattern above.
    • size: This matches against the size of the file, similar to the size constraints in the "More options" tab. A ",follow" can be appended to enable size comparison based on symlink targets.
    • timemod: This matches against the last modification time of the file, also available from the "More options" tab. This can use relative units like 5m, 1h, or an absolute date in ISO format.
    • timeaccess: This matches against the last access time of the file.
    • content: This applies a regular expression to the content of the file. Comma separated modifiers can be used to change the behavior. "case" can be used to do a case-sensitive match. "<number>" can be used to limit the amount of bytes checked. "follow" can be used to follow symlinks for content match.
      The complete expression is "content,case,follow,10m". All elements after the comma are optional. The number can be a byte count, or use standard suffixes like mb or kib.
    • &&: Both sub-expressions left and right of && must be true.
    • ||: Any sub-expressions left or right of || must be true.
    • Also see List view temporary filters for more details about the expression.
  5. Follow symlinks
    When selected the search will also enter symlinked directories when walking through the directory tree.
  6. Search content of archives too
    This option enables the search to look inside archives just as they were directories.
    Note: This can be significantly slower since every archive in any sub-directory will be opened. If the start directory is a remote directory this means that archives will be downloaded even if the search doesn't involve content matching.
  7. Same file system
    If enabled, the search will only operate on files and directories on the same file system as the start directory.
  8. Exclude label
    Files or directories with this label will be excluded from the search. If empty, no entry is excluded.
  9. Match directories too
    This option allows to apply filter like name, size, age also for directories themself instead of only files.

1.2.2. More options

The tab allows to refine the search by applying additional constraints:

1.3. Search results

Below the search parameters you can find the list of results. The complete file name is listed and, if the file content was checked, the line number.
There are buttons available for manipulating the results.
  1. Change directory to entry
    By clicking on this button you can immediately close the search window and the selected result will be highlighted in the active list view inside Worker.
    You can also double click on a result or press enter to do the same.
  2. View
    The active entry will be opened in the internal file viewer directly jumping to the corresponding line number, if any.
  3. Edit
    The edit command will be used to edit the active entry in an external editor. The command can be configured in the configuration of the search command.
  4. Remove selected results from list
    As the available results will be used for further results you can removed some entries from the list so these files won't be considered for search refinement.
    A right click will open a dialog to select the base directory for which all elements within will be removed. This is useful when there are matches in some directories that are of no interest at all.

1.4. Result store

You can select old results from the bottom list. The list of results will be updated just as the corresponding search parameters. You can also refine an older search by first selecting it and modify the search parameters and start the search again.

1.5. Panelize results

Since Worker 3.0.0 it is possible to show the results in the regular file view and work on these files. Just click on Panelize results button in the results window. You can choose to keep the window opened by right-clicking on the button. Otherwise the window closes and you see the matched files in the list view as a virtual directory. All file operation are supported in this view too (since Worker 3.1.0).

Here is an example of panelized search results: