On Sun, Jun 07, 2020 at 10:04:53PM +0100, Ottavio Caruso wrote: > On Sun, 7 Jun 2020 at 21:37, Daniel Jakots <d...@chown.me> wrote: > > > > On Sun, 7 Jun 2020 21:11:57 +0100, Ottavio Caruso > > <ottavio2006-usenet2...@yahoo.com> wrote: > > > > > Hi, > > > > > > "pkg_info -L PACKAGE-NAME" > > > > > > will give me a list of all the files within each package, regardless > > > of whether the package is installed or not. > > > > > > How can I restrict the output to only installed packages, making it > > > fail if the package is not installed? > > > > > > I could do: > > > > > > "pkg_info -f PACKAGE-NAME " > > > > > > but that would not give me full pathnames. > > > > > > I've looked at the pkg_info man page but I couldn't find a clue. > > > > > > Thanks. > > > > > > > A "creative" solution: > > $ cat -- /var/db/pkg/*/+CONTENTS > > > > for free, you get for each file its size, its timestamp, and > > its checksum! ;) > > Well no, because that would give results for all packages, not each of > them; no full path and extra garble. > > I'd have to think of a shell script. > > -- > Ottavio Caruso >
How about this? $ pkg_info -z | xargs pkg_info -L