The Tools menu
What is a Tool? An outside program that is called from 4Pane, and the results displayed by 4Pane. There are three of these built-in, but you can add more yourself.
The first three menu-items are for the standard tools: Locate, Find and Grep. Selecting one of these invokes the appropriate dialog, and the results are displayed in the Terminal Emulator.
Locate is the quickest way of searching for a file or directory, as it looks up a database rather than each search scanning the filesystem. If it isn't already available on your system,
install the 'findutils' package. Its search pattern can contain the simple wildcards *, ? and [Aa] (but see the -r option below).
The Locate dialog is quite simple; most often you'll just put the search string in the box and click OK.
It keeps a history of the searches that you can access from the dropdown arrow or the Down/Up keys. There are also options that may occasionally be useful:
- -b returns only matches in the last segment of a filepath; so the pattern 'foo' would match /bar/bigfoot but not /bigfoot/bar.
- -i ignores case, so that 'foO' would match /Foo, /FOO etc
- -e checks for the continued existence of each match, in case it had been deleted since the last database update. This might take a little time.
- -r says to treat the pattern as a Regular Expression.
Grep comes in two flavours. For everyday use there is Quick Grep, which is easy to use but provides only the commonest options;
and Full Grep, which has many more (see below).
In the Quick Grep dialog, all you absolutely have to fill in is the search pattern and the search path, though there are other (self-explanatory) things too e.g. 'ignore binary files'.
There are convenient shortcuts for the path: $HOME, '/' and (the most useful) the currently-selected directory. These settings are remembered by the dialog, as are recently used patterns and paths.
At the top of the dialog is a button to take you to the Full Grep dialog instead, and a checkbox to tick if you want that to be the default.
Since 4Pane 5.0, Find similarly has 'Quick' and 'Full' alternatives.
The Find and Full Grep dialogs definitely aren't simple; in fact they are too complicated to describe in detail here. Instead I've
made them as self-describing as possible. Both split the numerous available options into several pages, and most options have a detailed tooltip.
The Find dialog, as seen in Sabayon. Click a thumbnail to enlarge
For Find you will almost certainly want, as a minimum, to select from the Path and the Name pages;
for Full Grep the File Options, Pattern and Location pages. As you will see, selections made on a page aren't added to the
command until the Add to Command String button is clicked.
Most items that require you to provide a name e.g. the Find path, have a history. The final command also has a history, so you can alter and
repeat one of the previous commands. You can also do this from the Terminal Emulator's history.
The Full Grep dialog, as seen in Xubuntu. Click a thumbnail to enlarge
The output of these commands are a list of files displayed in the Terminal Emulator, and you'll often want to open one or more of them.
You can, by:
- Double-clicking one of them. If it's an executable file, it will be run. Otherwise, if it's a filetype that 4Pane knows how to deal with (e.g. a .txt file) it will be opened, or else the Open With dialog will appear.
If instead, while you double-click, you press the Ctrl key, instead of opening the file you will "Go To" it: the current pane will display its directory, with the file itself selected.
- Right-clicking over a file. A context menu will appear that contains those alternatives: Open or Go To.
Next a single item, Launch Terminal (Ctrl-T). This does just what is says: it opens a new console window, which will use the current selection as its path.
You can configure which console application is opened (konsole, gnome-terminal etc) in Options > Configure 4Pane > Terminals.
The rest of the menu deals with user-defined tools: programs or scripts that you have chosen yourself (from the Options > Configure 4Pane); more about these here.
Run a Program opens a submenu from which you can select one of these tools. Once you've run one of them, the last command, Repeat Previous Program,
allows you easily to repeat it.