Trying to search with opkg command in my Onion Omega system:
opkg search vim
opkg search v*
Got nothing in output in all cases. What I do wrong?
Trying to search with opkg command in my Onion Omega system:
opkg search vim
opkg search v*
Got nothing in output in all cases. What I do wrong?
The opkg search command wrongly states it expects a regexp (regular expression). It actually expects a glob (shell wildcard pattern). Furthermore, the pattern must match the entire path, and it only searches the database of installed packages.
So on one of my QNAPs,
opkg search /opt/bin/find # "findutils - 4.7.0-1"
opkg search find # no match
opkg search '*/find' # "findutils - 4.7.0-1"
But
opkg search '*/ls' # no match, because coreutils-ls is not installed
If you want to find which package provides a file, there is no easy way to do this. You can search for package names,
opkg list | grep vi
opkg list | awk '$1 ~ /\<vi/'
or hunt through visually,
opkg list | sort | cut -c1-80 | less