On Sun, 7 Jun 2020 at 22:26, Udo Zorn <u...@mailbox.org> wrote:
>
> 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

I probably didn't make myself clear and I apologize. I'd like to have
a list of files for just one package, and only if that package has
been installed. If not installed, it should tell me it hasn't been
installed or just provide no output, a bit like pkg_info behaves on
NetBSD.

-- 
Ottavio Caruso

Reply via email to