Bash - quickest way to do multiple searches for files
Hi all,
I am looking for the quickest way to do multiple searches for different files. Here is the scenario: I want to search for various icons one by one in a script. Preference is for the gnome icon theme. Code:
#!/bin/bash I do not want to use slocate, sqlite or the like since that will require admin privileges to update the database and/or extra dependencies. |
Quote:
|
BTW using 'locate' shouldn't be a problem either as unprivileged user: just create your own database with 'updatedb -U /usr/share/icons -o /dev/shm/icons.db --require-visibility no' then search with 'locate --database /dev/shm/icons.db -i opera'.
|
Or
Code:
find /usr/share/icons/ -regextype posix-extended -regex ".*(firefox|mozilla|gimp).*" As /usr/share/icons/gnome is a subdir of /usr/share/icons/ there's no point in searching it separately ... |
Wow! thanks for the updatedb tip. That is awesome!
|
Quote:
Also, I didn't want to repeatedly run find every time I search for an icon... hence creating the list. There is a performance advantage in doing this, right? |
All times are GMT -5. The time now is 05:46 AM. |