Search with wildcards

The search window in the Linux file manager (Caja in Linux Mint, Nautilus in Ubuntu) has always been a mystery to me. Intuitively I think I should use wildcards but, I look for something like *.txt and search returns nothing. My earlier workaround was to use the find command (Find-ing Files); however, I recently discovered two ways in which the file manager’s search feature can be used directly.

The first trick to learn is that, although wildcards are available in terminal commands, file manager doesn’t use them. Search for .txt (rather than *.txt) and all the text files are displayed. Furthermore, by default, this includes text files in any sub-folders so it can be a very powerful tool to locate a specific file anywhere on a disk.

The second trick, which I don’t find quite as useful, is to use the Ctrl-S hotkey inside the file manager. This pops up a dialogue box that asks for a file name “pattern” that will be used to highlight all matching items. Thus, entering a wildcard string, such as *.txt, highlights all the text files in the current folder. My difficulty with this technique is that the folder listing still displays all of the files in the folder rather than “extracting” just the relevant results.

While these techniques will allow files to be located in many circumstances, there will be occasions when a wildcard pattern is required for a search across multiple folders or even over an entire disk. In such cases, the find command will be more useful and, for my purposes, I can use my home-grown batch file to quickly “find” what I’m looking for.

References:

how to search for files and file contents with GUI?
http://askubuntu.com/questions/167203/how-to-search-for-files-and-file-contents-with-gui

10 Nautilus tips and tricks
http://www.greplinux.net/2012/06/10-nautilus-tips-and-tricks.html

How to Use Wildcards
http://www.linfo.org/wildcard.html

Find-ing Files
https://linuxnorth.wordpress.com/2012/08/23/find-ing-files/

Advertisements
This entry was posted in Mint and tagged , , , . Bookmark the permalink.

2 Responses to Search with wildcards

  1. Sebastian says:

    How to you use wildcards, especially the * (star) in Linux Ubuntu Nautilus GUI File Search?

    I also was just struggling with this issue, but I think I found an answer.

    Here are the equivalent Windows and Nautilus search patterns:

    Windows: 2016*diagram*.ppt

    Nautilus: 2016 diagram ppt

    Basically, try using a spacebar character in Nautilus where you would use a * character normally. I think I FINALLY figured this out, after years of trying… sigh.

    I’m replying to your post because it was one of the first to show up on Google when I tried to find a solution.

  2. Alan German says:

    Sebastian:

    Thanks for the tip. I have a bunch of files in a folder in the form 0_*.txt. I’m currently using Linux Mint for which Caja is the default file manager. I think this works in the same manner as Nautilus. Certainly, following your file pattern, searching in the folder for 0_ txt locates all of the subject files.

    Alan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s