掌握 Linux 桌面中的 Nautilus 文件搜索
Nautilus 搜索
![](/data/attachment/album/202401/25/155635ocrk3q8dgg3rkkgh.jpg)



> 
> 使用 GNOME 的 Nautilus 文件搜索，通过这些方便的提示改善您的文件搜索体验，成为一名专业的搜索者。
> 
> 
> 


GNOME 的 Nautilus 文件管理器功能丰富。


不信？看看这篇文章，你就会知道如何将 [Nautilus 的全部功能](https://itsfoss.com/nautilus-tips-tweaks/) 发挥到极致。


文件搜索是 Nautilus 被忽视的功能之一。没有多少 Linux 用户充分发挥了它的潜力。


因此，我编写了本教程，与大家分享一些使用 Nautilus 文件管理器中文件搜索选项的技巧。


我知道经验丰富的 Linux 用户可以使用终端中的 [find 命令](https://linuxhandbook.com/find-command-examples/?ref=itsfoss.com) 实现相同的目的，但许多桌面用户更喜欢使用 GUI。


让我们从最简单的搜索选项开始。


### 按名称搜索文件


打开 Nautilus 并单击顶部栏上的放大镜。这将打开一个搜索栏，你可以在其中输入查询字符串。


当你输入时，搜索结果会不断完善，并在输入完整文件名时进行匹配。


![在 Nautilus 中搜索](/data/attachment/album/202401/25/155721f0v139r2ff974msu.png)



> 
> ? 搜索在当前目录及其子目录中执行。可以启用 [隐藏文件视图](https://itsfoss.com/show-hidden-files-linux/)，将隐藏文件包含在搜索结果中。
> 
> 
> 


### 根据时间搜索文件


使用 Nautilus，你可以根据文件的创建、修改或上次访问的时间过滤搜索。


为此，请单击搜索按钮并开始输入。当你开始输入时，你会注意到搜索按钮附近有一个下拉菜单。点击它。这将为你提供一个菜单，其中包含用于过滤搜索的选项。


![单击下拉菜单](/data/attachment/album/202401/25/155721jynypyzp7hu5hhi5.png)


单击下拉菜单上的 “<ruby> 选择日期 <rt>  Select Dates </rt></ruby>” 按钮。另外，选择选项 “<ruby> 文件名 <rt>  File Name </rt></ruby>” 以按文件名匹配。


![按日期搜索的设置](/data/attachment/album/202401/25/155721u8jbjba82kpeeass.png)


这将为你提供一个扩展菜单，你可以在其中选择文件创建、修改或上次访问的日期。


![设定标准](/data/attachment/album/202401/25/155722o819iqan3ony39yn.png)


在这里，如果你想设置自定义日期，请单击日历图标，如下图所示：


![点击日历图标](/data/attachment/album/202401/25/155722r2zohw8ki0wx1fkf.png)


现在，你将看到一个小日历，并可以相应地选择日期。


![选择日期](/data/attachment/album/202401/25/155723ytnk0d2fkykfn8nt.png)


从列表中设置你选择的日期后，你可以看到搜索栏上应用的条件，并向你显示基于该条件的文件。


![应用日期标准](/data/attachment/album/202401/25/155723dngghh91gj9ecca3.png)


### 根据文件类型搜索文件


你还可以根据文件类型过滤搜索。假设你正在寻找 PDF 文件。


与上一步一样，单击搜索图标并开始输入文件名。现在，从下拉菜单中，单击 “<ruby> 任何 <rt>  Anything </rt></ruby>” 选项并选择 “<ruby> 文件名 <rt>  File Name </rt></ruby>”。


![根据文件类型搜索](/data/attachment/album/202401/25/155724oufguvk0dozvpr54.png)


从展开的视图中选择要搜索的文件类型。在这里，我选择了 “PDF/Postscript”。


![设置所需的文件类型](/data/attachment/album/202401/25/155724lme22ycoy26gijgy.png)


选择所需的文件类型后，你可以在搜索栏上看到应用的条件。你还将看到相应的结果。


![应用文件类型标准](/data/attachment/album/202401/25/155724yhg0eotiphhg09y9.png)


在搜索选项中没有找到所需的文件类型？向下滚动到底部并单击 “<ruby> 其他类型 <rt>  other types </rt></ruby>”。


![获取更多文件类型](/data/attachment/album/202401/25/155725u97u681pi8s9i949.png)


这将为你提供更多文件类型。


![列出更多文件类型](/data/attachment/album/202401/25/155725dkx1xnm273nm3a9i.png)


### 搜索文件内容，而不是名称


默认情况下，根据文件名执行文件搜索。如果你想知道是否有包含特定单词的文件，Nautilus 也允许你这样做。


首先，单击搜索图标并开始输入。现在，与前面的部分一样，转到下拉菜单。


在下拉菜单中，不要选择 “<ruby> 文件名 <rt>  File Name </rt></ruby>”，而是选择 “<ruby> 全文 <rt>  Full Text </rt></ruby>”。


现在，你可以搜索特定字符串并根据特定日期或文件类型进行搜索过滤。过滤的方法与前面提到的相同。


![选择“全文”选项](/data/attachment/album/202401/25/155726whhz6zhf6k86pgbf.png)


在这里，我使用了字符串 “text to be”，你可以看到列出了几个具有该特定字符串的文件。另外，你可以看到，该部分也突出显示。


### 仅搜索文件或仅搜索文件夹


默认情况下，Nautilus 会搜索文件和文件夹。你可以将搜索细化为文件或文件夹。


为此，请在下拉菜单中选择 “<ruby> 文件名 <rt>  File Name </rt></ruby>”，然后从类型列表中选择 “<ruby> 文件 <rt>  Files </rt></ruby>” 或 “<ruby> 文件夹 <rt>  Folders </rt></ruby>”，如下所示。


![仅在文件或文件夹中搜索](/data/attachment/album/202401/25/155726xuc32y3jk3y3wwy2.png)


这将根据你的选择过滤结果。


### 应用多个过滤器


你可以将日期过滤器和类型过滤器组合在一起以获得更精确的搜索。为此，请从各自的下拉列表中选择每个条件。


你可以在下面的截图中看到，我已经搜索了包含字符串 “to be search” 的文件。我应用的标准是 1 天内创建的 PDF 文件。


![应用多个过滤器](/data/attachment/album/202401/25/155726mltzllhsszdkshid.png)


### 更多 Nautilus 提示和调整


Nautilus 足以满足大多数搜索场景。如果你需要更多，还有专用的 GUI 工具，可让你执行桌面范围的自定义搜索。



> 
> **[ANGRYsearch - 用于 Linux 的快速搜索图形用户界面工具](https://itsfoss.com/angrysearch/)**
> 
> 
> 


想要更多这样的 Nautilus 技巧吗？ [以 root 身份打开文件](https://itsfoss.com/open-nautilus-as-administrator/) 怎么样？



> 
> **[在 Nautilus 文件管理器中以管理员身份打开文件和文件夹](https://itsfoss.com/open-nautilus-as-administrator/)**
> 
> 
> 


或者将终端的功能与文件管理器结合起来？



> 
> **[在 Linux 中混合搭配终端与 Nautilus 文件管理器](https://itsfoss.com/terminal-nautilus-combination/)**
> 
> 
> 


这里还有更多此类提示。请自行查看。



> 
> **[在 Linux 中调整 Nautilus 文件管理器的 13 种方法](https://itsfoss.com/nautilus-tips-tweaks/)**
> 
> 
> 


我希望你喜欢这些技巧，它们有助于更好地改善你的桌面 Linux 体验。


你还知道其他这样酷的技巧吗？ 请在评论中分享。


*（题图：DA/77ae519f-e942-42b0-9808-4af943b168cb）*




---


via: <https://itsfoss.com/nautilus-file-search/>


作者：[Sreenath](https://itsfoss.com/author/sreenath/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

GNOME's Nautilus file manager is quite versatile.

Don't believe me? Check out this article to see how you can [tweak Nautilus to its full capability](https://itsfoss.com/nautilus-tips-tweaks/).

One of the overlooked Nautilus features is the file search. Not many Linux users utilize its full potential.

And that's why I created this tutorial to share some tips on using the file search option in the Nautilus file manager.

I know that a seasoned Linux user can achieve the same with the [find command](https://linuxhandbook.com/find-command-examples/) in the terminal but using the GUI is preferable by many desktop users.

Let's begin with the simplest of the search options.

## Search for files by name

Open Nautilus and click on the magnifying glass on the top bar. This will open a search bar, where you can enter the query string.

As you type, the results will get refined and will match upon typing the full file name.

![Click on the magnifying glass icon on top bar to start searching](https://itsfoss.com/content/images/2023/08/Click-on-the-search-button-and-start-typing.png)

[hidden file view](https://itsfoss.com/show-hidden-files-linux/)to include hidden files in the search result.

## Search files based on time

With Nautilus, you can filter your search according to the time the file was created, modified or last accessed.

For this, click on the search button and start typing. As you start typing, you will notice a drop-down menu near the search button. Click on it. This will give you a menu with options to filter your search.

![Click on the dropdown menu for more search filters](https://itsfoss.com/content/images/2023/08/Access-more-search-options.png)

Click on the “Select Dates” button on the drop-down menu. Also, select the option “**File Name**” to match by file name.

![Select the dates section on the dropdown with "File Name" option selected](https://itsfoss.com/content/images/2023/08/click-on-time-option-to-get-expanded-list.png)

This will give you an expanded menu where you can select the date since which the file is created, modified or last accessed.

![Set the date wise criterea for your search, like last modified, accessed etc.](https://itsfoss.com/content/images/2023/08/Search-according-to-date-and-time.png)

Here, if you want to set a custom date, click on the calendar icon as shown in the screenshot below:

![Click on Calendar Icon to get a mini calendar](https://itsfoss.com/content/images/2023/08/click-on-calendar-icon.png)

Now, you will get a small calendar and can select the date accordingly.

![Select the date required from the mini calendar](https://itsfoss.com/content/images/2023/08/select-date-from-calendar.png)

Once you set a date of your choice from the list, you can see the criteria applied on the search bar and files based on that condition are showed to you.

![Date criteria is applied to your search, which is highlighted on the top bar](https://itsfoss.com/content/images/2023/08/Showing-search-criterea-date-on-search-result.png)

## Search files based on file type

You can also filter your search based on file type. Let's say you are looking for a PDF file.

As in the previous step, click on the search icon and start typing the name of the file. Now, from the drop-down menu, click on “Anything” option with “File Name” selected.

![Select "Anything" dropdown button to select search based on file type](https://itsfoss.com/content/images/2023/08/click-on-type-option-to-get-expanded.png)

Select the type of file you want to search from the expanded view. Here, I have selected "PDF/Postscript" option.

![From the dropdown list of file types, select the file type you want](https://itsfoss.com/content/images/2023/08/Search-based-on-file-type-like-pdf.png)

Once you have selected your required file type, you can see the criteria applied on the search bar. You'll also see the result accordingly.

![File type criteria applied on search, which is highlighted on the top bar](https://itsfoss.com/content/images/2023/08/showing-search-criteria-type-on-search-result.png)

Didn't find the desired file type in the search option? Scroll down to the bottom and click on “other types”.

![Click on "Other Type" option to get more file types](https://itsfoss.com/content/images/2023/08/click-on-other-type.png)

This will give you more file types.

![More file types are listed as a dialog box, from which you can select one](https://itsfoss.com/content/images/2023/08/complete-list-of-types.png)

## Search into file content, not names

By default, the file search is performed on the name of the files. If you want to know if there are files that contain certain word, Nautilus allows you to do that as well.

First, click on the search icon and start typing. Now, as in the previous sections, go to the dropdown menu.

In the dropdown menu, instead of selecting “[ File Name](https://linuxhandbook.com/find-command-examples/)”, select “

**Full Text**”.

Now, you can search for a particular string and filter that search either based on a particular date or file type. The method for filtering is the same as mentioned in the previous sections.

![Select "Full Text" option to start search within file contents](https://itsfoss.com/content/images/2023/08/Search-inside-the-file.png)

Here, I have used a string “text to be” and you can see that several files with that particular string are listed. Also, you can see, that part is also highlighted.

## Search only files or only folders

By default, Nautilus searches for both files and folders. You can refine your search to either files or folders.

To do this, on the drop-down menu, select “File Name” and then from the type list select either files or folders as shown below.

![Search among only files or only folders](https://itsfoss.com/content/images/2023/08/search-for-only-folders-or-only-files.png)

This will filter out the results according to your choice.

## Apply multiple filters

You can combine the date filter and type filter together to get a more refined search. For this, select each criteria from their respective dropdown list.

You can see, in the below screenshot, that I have searched for a file that contains the string “to be search”. The criteria I have applied is, a PDF file, created since1 day.

![Applied multiple filters to the search action like PDF file type, created since a day and search by file content](https://itsfoss.com/content/images/2023/08/applied-multiple-criteria.png)

## More Nautilus tips and tweaks

Nautilus is sufficient for most search scenarios. If you need more, there are dedicated GUI tools too that allow you to perform a desktop-wide, custom search.

[ANGRYsearch - Quick Search GUI Tool for LinuxA search application is one of the most important tools you can have on your computer. Most are slow to indexes your system and find results. However, today we will be looking at an application that can display results as you type. Today, we will be looking at ANGRYsearch. What](https://itsfoss.com/angrysearch/)![](https://itsfoss.com/content/images/wordpress/2018/12/search-desktop-linux.jpeg)


![](https://itsfoss.com/content/images/wordpress/2018/12/search-desktop-linux.jpeg)

Want more such Nautilus tips? How about [opening files as root](https://itsfoss.com/open-nautilus-as-administrator/)?

[Open Files and Folders as Admin in Nautilus File ManagerLearn to add an “Open as Administrator” option in the right click context menu in Nautilus file manager in Ubuntu and other Linux distributions.](https://itsfoss.com/open-nautilus-as-administrator/)![](https://itsfoss.com/content/images/wordpress/2020/04/open-nautilus-as-root.jpg)


![](https://itsfoss.com/content/images/wordpress/2020/04/open-nautilus-as-root.jpg)

Or combining the power of terminal with the file manager?

[Mix and Match Terminal With Nautilus File Manager in LinuxHere are a few tips and tweaks to save your time by combining the terminal and the file manager in Linux.](https://itsfoss.com/terminal-nautilus-combination/)![](https://itsfoss.com/content/images/2023/07/embed-terminal-nautilus.png)


![](https://itsfoss.com/content/images/2023/07/embed-terminal-nautilus.png)

There are many more such tips in the article here. Feel free to check it out.

[13 Ways to Tweak Nautilus File Manager in LinuxNautilus, aka GNOME Files, is a good file manager with plenty of features. You can further enhance your experience by using these extensions, tweaks and tips.](https://itsfoss.com/nautilus-tips-tweaks/)![](https://itsfoss.com/content/images/wordpress/2022/07/customizing-GNOME-Nautilus-File-Manager.png)


![](https://itsfoss.com/content/images/wordpress/2022/07/customizing-GNOME-Nautilus-File-Manager.png)

I hope you like these tips and they help improve your desktop Linux experience slightly better.

Do you know any other such cool tips? Do share it in the comments.