1

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?

vico
  • 783
  • 3
  • 18
  • 32

2 Answers2

1

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
roaima
  • 107,089
  • 14
  • 139
  • 261
0

To search for available package use:

opkg list | grep package

or

opkg list *package*

search usage in opkg:

opkg search file    

To list the package providing file.

opkg manpages:

   search <file|regexp>    List package providing <file>
GAD3R
  • 63,407
  • 31
  • 131
  • 192