Search
TKTail searches without loading files into memory and without freezing the window - also a file of many gigabytes. Which search to use:
| You want | Use |
|---|---|
| The next place in this file | Find - Ctrl+F (below) |
| Every match in all open files and event logs | Find in All Open Files - Ctrl+Shift+F, or the search box on the right of the toolbar |
| Text, a field condition, a time range - in chosen files, folders or event logs | Advanced Search - Ctrl+Alt+F (Advanced Search) |
| Only among the results of a search | Search Within These Results (Search Results) |
| One thing, then another within a time window (“a WARN, then an ERROR within 30 s”) | a sequence in Advanced Search (Sequences) |
| Files by name or content in a folder - without opening them | the Explorer’s Search Files… / Search Contents… (Searching folders) |
| Events in an event log | Find in an event tab (Finding events) |
| The same question again later | a Saved Search (Save the question, save the answer) |
| An AI assistant to search for you | AI integration - its searches show in Search Results too |
Every search except Find keeps its results as a search session in the bottom panel’s Search Results: you can open each result, refine, export or save it, and run it again later. A search says exactly what it searched and whether everything was searched (Completed, Incomplete with the reason, Cancelled).
Find in a file
Ctrl+F opens the find bar directly below the tabs of the pane you are working in; it searches only the current file (the toolbar’s search box searches open files or folders).
- Type and press Enter (next) or Shift+Enter (previous), or use the up / down arrows; F3 / Shift+F3 work from the pane too. Esc or x closes the bar - the search stays with the file.
- Options (the small buttons): Aa match case, .* regular expression, the funnel for a
field condition such as
level = ERRORin structured records, and the circular arrows for wrapping around at the end of the file. - Next to the query the bar shows where you are, for example 3 / 864 (the third of 864 matches). The total is counted in the background after the first match is found (“counting 42%” meanwhile), so even huge files never freeze. With more than 100,000 matches the bar shows only the total. No matches means the file does not contain it.
- Every tab keeps its own search: switching tabs shows that tab’s query and result; a tab without a search keeps what you typed, so Enter repeats it there. In a split, the bar moves to the pane you click into.
- The search runs in the background in slices, so it never freezes the window, even on huge files; the result is highlighted and scrolled into view (the view pauses).
- Previous searches are kept in the find history.
Regular expressions
With .* on, the query is a regular expression - the same rules everywhere TKTail searches: the find bar, Find in All Open Files, Advanced Search, event tabs, alert rules and the export filter.
- Any language. Letters, digits and case work for every script: with Aa off,
zamówieniefindsZAMÓWIENIEandZamówienie;.is one whole character, an emoji too;\d,\wand\sinclude non-Latin digits, letters and spaces (use[0-9]for ASCII digits only). - One line at a time. A match never runs across lines;
^and$are the start and the end of the line. In a log whose entries span several lines (a stack trace), the line that matches is found and the Inspector / RECORD show the whole entry. - Useful additions: look behind
(?<=\$)\d+(a number after$), named groups(?<year>\d{4}), Unicode classes\p{L}(any letter),(?i)for case-insensitive,\x{F3}for a character by its code. Older patterns with\uand four hex digits (\u00F3) still work. - Patterns that would run away (
(a+)+$on a long line) stop at once at that line. TKTail has two safety layers: each line has a fixed limit, and a whole search has a breaker. In the find bar, Find Next ends with Regex complexity limit exceeded on a line - simplify the pattern, and a count that stopped there says so - 1 / 2 · incomplete (point at it for the reason). A search over sources (Find in All Open Files, Advanced Search) skips such a line, keeps going and says Incomplete - 1 line skipped; a pattern that keeps hitting the limit is stopped - This regular expression is too expensive for the data searched - simplify the pattern - and what it found stays. That is not a syntax error: the same pattern may be fine on other data. Exporting the lines matching such a pattern fails rather than leave lines out. A mistake in the pattern says where it is: Invalid regular expression at position 4: missing closing parenthesis. When the find bar cuts a message short, point at it to read all of it. - Searching for text that is not a regular expression is faster with .* off.
Recipes
Search across several files - open them (or drop them into TKTail), press Ctrl+Shift+F, type the text and press Enter. The results list each match with its file, line and time; double-click one to go there.
Errors of one request across logs - Advanced Search (Ctrl+Alt+F): add the files, a field condition
requestId = ABC123 (or the text), a time range if you know it; Search.
What happened right before an error - a sequence: step 1 WARN, step 2 ERROR within 30 seconds after
it - see Sequences.
A folder of old logs - in the Explorer, right-click the folder > Search Contents… - the files are read without being opened as tabs.