Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How to search for multiple file names at once in Ubuntu via the GUI? I tried Nautilus but without success.

share|improve this question
    
I don't know if you will find a easy way to do this in Nautilus, but in terminal you can use this example: find . -type f \( -name "*.class" -o -name "*.sh" \) –  Radu Rădeanu May 29 '13 at 13:32

1 Answer 1

up vote 1 down vote accepted

Try gnome-search-tool

It's available in the software centre, or via sudo apt-get install gnome-search-tool.

When you run it, rather than enter things to the 'Name contains' box, click on 'Select more options', then the drop down and choose 'Name matches regular expression', then click add. In the new box that appears, you can use any regular expression to search file names. If you want file1 or file2, then type file1|file2.

This is someone else's image, but it illustrates the method:

enter image description here

There are a number of options for searching, and regular expressions (regex) are very powerful, googling may find you further examples to try.

The program does not index your files, so if you search a large area, it may take a while.

Integrating with Nautilus:

A Nautilus-script will allow you to launch gnome-search-tool within the current directory. Simple create a file called Search Here in ~/.gnome2/nautilus-scripts, and put:

#!/bin/sh
exec gnome-search-tool --path=$NAUTILUS_SCRIPT_CURRENT_URI

as the entire file contents. Then, set the file as executable (under Properties, Permissions). Now, close all instances of Nautilus, and reopen one. When you right-click in a directory, there should be a submenu called 'Scripts', under which 'Search Here' appears. This will open gnome-search-tool in the current directory.

share|improve this answer
    
That was the problem, no regular expressions applicable. –  22lk94k943 only May 29 '13 at 19:58
    
Sorry, I'm confused. Do you mean that my answer doesn't solve your problem because there is no applicable regular expression, or that Nautilus doesn't accept regular expressions? Nautilus does not understand regular expressions, so if you want a GUI search which does, then I have given an example. If you want to integrate it with Nautilus a bit more, then a script could to so: I'll edit my answer. –  Frankie May 29 '13 at 20:33
    
Can we search for multiple file names in gnome-search-tool? I have a file that contains names of all files that have to be moved some where else, now there are no regular expression to indicated them. If i will put *.htm it will obviously index all htm files, i want to put all the file names which are different[i.e. cabug.htm grahew.htm killbil.htm so on, nothing regular about them], to search all of them at once or feed the file containing all file names to an command line search utility to index them in one place or mv them to specified folder. –  22lk94k943 only May 30 '13 at 4:02
    
If you want file1 or file2, then type file1|file2 this method is not working in my system. –  22lk94k943 only May 30 '13 at 4:12
    
Interesting, it works perfectly for me. You are definitely typing that into the new box that appears, not the one at the top of the program? –  Frankie May 30 '13 at 11:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.