0

In the Files browser, AKA Nautilus, I can search for all text files that contain a certain string:

  1. Top bar > Click on the search icon.
  2. Search bar > Click on the option for "Full Text" search. (Search Inside Files)

Nautilus-search-inside-files


This will work for regular text files like "filename.txt". But as soon as you try to search for some "filename.css" or "filename.svg", then it stops working: "No Results Found".

These CSS and SVG files are just text files with a different file name extension. It should be possible for Nautilus to search for all CSS and SVG files containing a certain string. I can do that using some CLI commands, but I would prefer to perform this in Nautilus.

(on Ubuntu 24.04)

1 Answers1

0

Searchmonkey is a great alternative. It can search for text in a large variety of file formats. It is an easy to use GUI.

sudo apt install searchmonkey

Searchmonkey


I still would have preferred to get this versatility directly in the file manager. But I found a similar thread with an explanation:

Programming code is not indexed. That’s why script and source files do not have their content matched while searching.

This is intentional. Our indexing/searching components are optimized for natural language text in documents, not programming code. We would be wasting system resources and still do a poor job. There are plenty of IDEs and source-code indexing tools already, which are better at this job than our content search would ever be.

(A comment from antoniof (António Fernandes) in https://discourse.gnome.org/t/nautilus-files-content-search-in-different-files-extensions/16516/2)