LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2007, 10:58 AM   #1
powah
Member
 
Registered: Mar 2005
Distribution: FC, Gentoo
Posts: 276

Rep: Reputation: 30
determine which rpm a file belong


I use FC6.
How to determine which rpm a file belong?
i.e. any linux command to find out which rpm install the file (e.g. /etc/inittab)?

Last edited by powah; 10-25-2007 at 11:03 AM.
 
Old 10-25-2007, 11:12 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
By the rpm command in query mode the option -f tells you what you're looking for. For example
Code:
rpm -qf /etc/inittab
See man rpm for details.
 
Old 10-25-2007, 02:38 PM   #3
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
rpm -qif /path/to/file
Gives information about the package that a particular file came from.

rpm -qcf /path/to/file
Points to any configuration files associated with package.

rpm -qdf /path/to/file
Points to documentation for package

rpm -Vf /path/to/file
Lists any files that have been modified since package installation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which path to use to query rpm to determine which RPM to install? elitt2 Red Hat 4 10-08-2007 02:18 PM
how can I find the file belong to what pkg? jiawj Slackware 9 03-07-2005 09:16 PM
Does anyone know of a bash script that will determine if RPM exists on a system? jimwelc Linux - Software 3 12-28-2004 04:01 PM
How to determine compile time arguments for an installed rpm? coolamit78 Linux - Software 5 04-22-2004 04:18 AM
Can a file belong to more than one group? lostboy Linux - General 2 11-08-2003 12:14 PM


All times are GMT -5. The time now is 10:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration