psearch -c www|wc -l
3486
wc -l
counts the lines. psearch -c category
.I have ports-mgmt/psearch installed.
psearch
looks into /usr/ports/ so you must have ports installed pkg rquery '%C %n-%v' | awk '/^www / { print $2 }'
. There maybe duplicate entries in the output because of virtual categories.Yes, zope is a virtual category. There is no corresponding ports directory but ports/packages are still classified as belonging to it.using this commandpkg rquery '%C' | sort -u
I see for example zope, which is not in /usr/ports
pkg rquery '%o' | cut -d/ -f1 | sort -u
# pkg search filezilla
filezilla-3.24.0_2 Fast and reliable cross-platform FTP, FTPS, and SFTP client
..
# pkg search -o filezilla
ftp/filezilla Fast and reliable cross-platform FTP, FTPS, and SFTP client
...
-o
, how to show also the version of the package? sqlite3 -list /var/db/pkg/repo-FreeBSD.sqlite 'SELECT version FROM packages WHERE name="filezilla";'
sqlite3 -list /var/db/pkg/local.sqlite 'SELECT version FROM packages WHERE name="filezilla";'