FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 11-20-2011, 09:48 AM
Jakob Gruber
 
Default How to find if a file belongs to a installed package?

On 11/20/2011 11:44 AM, Hector Martinez-Seara wrote:
> Hi,
> I have been looking but I haven't found a solution to check if a given
> file in my system belongs to any of my Installed packages.
>
> For example, in all my 3 archllinux machine I have a directory named:
> /usr/lib/libreoffice/basis3.3 85Mb
>
> I would not expect to have this directory as I'm fully updated and my
> current libreoffice is 3.4. Accordingly there also exists the
> directory:
> /usr/lib/libreoffice/basis3.4 335Mb
>
> I'm not an expert in the libreoffice package and therefore blindly
> removing the first, without knowing if it is really needed or it is
> just some directory during the updates, makes me feel unconformable.
>
> The command in question should be able not only to check repository
> packages but also locally installed ones although if it is not
> possible with the first will be enough.
> Thanks in advance,
> Hector

That would be pacman -Qo. From the manpage:

QUERY OPTIONS
[...]
-o, --owns <file>
Search for packages that own the specified file(s). The path
can be relative or absolute and one or more files can be specified.
 
Old 11-20-2011, 10:02 AM
Hector Martinez-Seara
 
Default How to find if a file belongs to a installed package?

Why I'm so blind,
Thanks

On 20 November 2011 12:48, Jakob Gruber <jakob.gruber@gmail.com> wrote:
> On 11/20/2011 11:44 AM, Hector Martinez-Seara wrote:
>> Hi,
>> I have been looking but I haven't found a solution to check if a given
>> file in my system belongs to any of my Installed packages.
>>
>> For example, in all my 3 archllinux machine I have a directory named:
>> /usr/lib/libreoffice/basis3.3 * *85Mb
>>
>> I would not expect to have this directory as I'm fully updated and my
>> current libreoffice is 3.4. Accordingly there also exists the
>> directory:
>> /usr/lib/libreoffice/basis3.4 * * * *335Mb
>>
>> I'm not an expert in the libreoffice package and therefore blindly
>> removing the first, without knowing if it is really needed or it is
>> just some directory during the updates, makes me feel unconformable.
>>
>> The command in question should be able not only to check repository
>> packages but also locally installed ones although if it is not
>> possible with the first will be enough.
>> Thanks in advance,
>> Hector
>
> That would be pacman -Qo. From the manpage:
>
> QUERY OPTIONS
> [...]
> * * * -o, --owns <file>
> * * * * * Search for packages that own the specified file(s). The path
> can be relative or absolute and one or more files can be specified.
>



--
Hector Martínez-Seara Monné
mail: hseara@gmail.com
Tel: +34656271145
Tel: +358442709253
 
Old 11-20-2011, 10:21 AM
Guillaume Alaux
 
Default How to find if a file belongs to a installed package?

On 20 November 2011 12:02, Hector Martinez-Seara <hseara@gmail.com> wrote:
>
> Why I'm so blind,
> Thanks
>
> On 20 November 2011 12:48, Jakob Gruber <jakob.gruber@gmail.com> wrote:
> > On 11/20/2011 11:44 AM, Hector Martinez-Seara wrote:
> >> Hi,
> >> I have been looking but I haven't found a solution to check if a given
> >> file in my system belongs to any of my Installed packages.
> >>
> >> For example, in all my 3 archllinux machine I have a directory named:
> >> /usr/lib/libreoffice/basis3.3 * *85Mb
> >>
> >> I would not expect to have this directory as I'm fully updated and my
> >> current libreoffice is 3.4. Accordingly there also exists the
> >> directory:
> >> /usr/lib/libreoffice/basis3.4 * * * *335Mb
> >>
> >> I'm not an expert in the libreoffice package and therefore blindly
> >> removing the first, without knowing if it is really needed or it is
> >> just some directory during the updates, makes me feel unconformable.
> >>
> >> The command in question should be able not only to check repository
> >> packages but also locally installed ones although if it is not
> >> possible with the first will be enough.
> >> Thanks in advance,
> >> Hector
> >
> > That would be pacman -Qo. From the manpage:
> >
> > QUERY OPTIONS
> > [...]
> > * * * -o, --owns <file>
> > * * * * * Search for packages that own the specified file(s). The path
> > can be relative or absolute and one or more files can be specified.
> >
>
>
>
> --
> Hector Martínez-Seara Monné
> mail: hseara@gmail.com
> Tel: +34656271145
> Tel: +358442709253

The only thing being that "pacman -Qo" cannot determine ownership of
directories.

But still you can guess with:
$ pacman -Ql libreoffice-base| grep basis
libreoffice-base /usr/lib/libreoffice/basis3.4/
[..]

--
Guillaume
 

Thread Tools




All times are GMT. The time now is 10:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org