LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   yum command for directories (https://www.linuxquestions.org/questions/linux-newbie-8/yum-command-for-directories-4175494791/)

jyunker 02-13-2014 10:54 AM

yum command for directories
 
I know that the command:

yum provides filename

gives the name of the package that created and installed the file. I am looking for an
equivalent command that can apply to directories. Is there a command for determing what
package created and installed a directory in Linux 6,5, 64 bit Centos?

Thanks,

R,

jyunker

colucix 02-13-2014 11:10 AM

yum whatprovides and rpm -qf work for directories as well. Take in mind that all the default system directories are provided by the package filesystem. Others could have been created by other packages, but some (parent) directories don't belong to any package if they have been created together with their sub-directories. For example on my CentOS system I have a directory named /opt/intel/composerxe-2011.0.084 and
Code:

$ rpm -qf /opt/intel/composerxe-2011.0.084
intel-openmp-084-12.0-0.x86_64
intel-openmp-devel-084-12.0-0.x86_64
intel-compilerpro-common-084-12.0-0.noarch
intel-compilerpro-vars-084-12.0-0.noarch
...

but if I try the parent directory /opt/intel I get no results:
Code:

$ rpm -qf /opt/intel
file /opt/intel is not owned by any package

even if it has been created from the aforementioned intel packages.

jyunker 02-13-2014 12:23 PM

Thanks I will try it.

R,

jyunker


All times are GMT -5. The time now is 09:50 AM.