How to search optimally your files

You don’t need to be an expert of the commandline to search for files in a featured of options way

There’s tools in Elive that makes it very easy, now see the different options that you have:

  • regex support
  • different directories search
  • older / newer than, in the last
  • excluded options
  • sorting preferences
  • and more…

How to use it

  • Hit Alt + Esc to run the launcher
  • Type search or the equivalent translation for your language, and press Enter to run it

Note: Since the version 2.9.99 it is included by default in the dock bar to make a more friendly experience

This may be an old topic, but if I only need basic searching, I run this (i know there are ways without grep but this is the only way I can remember):

find / | grep "<yoursearchterm>"

Do that as "sudo" to be rid of the error messages clutter. :smiley14:

1 Like

find has many options, like searching only files, recent ones, do actions for the files found, etc..

a more correct equivalent command (to not pipe results to a grep command, and searching only for files) will be:

 find . -type f -iname '*'someword'*'

by other side, if you want speed, you can install the pacakge "locate" and then run "sudo updatedb" (it will take time and your HD is going to be scanned automatically from time to time, slowing down your computer, you are warned :stuck_out_tongue: )

so this one creates a database of all your files in your machine, searching for it later is much faster, example:

~ ❯❯❯ time locate enlightenment | wc -l
22464
locate enlightenment 2.21s user 0.01s system 96% cpu 2.304 total

so: 22 thousands results of files with the name "enlightenment" found in 2.3 seconds :omfg:

2 Likes

You also have to specify the path to the directory i.e # find /home/jk/Documents -type f - iname *someword. you want to search otherwise find alone without the path searches only the current directory and exits. I almost tore out my hair when i trying the command and it could not find my file which i had created and could see in the graphical user interface. I love wild cards symbols ** ?.

1 Like