Here's a way to identify from which program package a file belongs to or which package a directory folder belongs to or created from? That is, which package name installed and created a particular package file?
Supposed that you encounter a file name lying a round from some directory and the file looks like unfamiliar to your mind's file list. And you are aware that this file is part of an application package currently installed from your box, and you just can't identify which package name was that file belongs to.
Identify From Which Package Name a File Belongs To
I am taking for an example, say /etc/named.conf . Let us determine which package name this file belongs to. Here's how to accomplish this task, simply issue
# rpm -qf /etc/named.conf
Result:
~~~~~~~~~~~~~~~~~~~~~~~
bind-9.5.0-22.b1.fc8
~~~~~~~~~~~~~~~~~~~~~~~
Another example
# rpm -qf /etc/pango/pangox.aliases
Result:
~~~~~~~~~~~~~~~~~~~~~~~
pango-1.18.3-1.fc8
~~~~~~~~~~~~~~~~~~~~~~~
The command normally shows the package name where the file belongs to and the package version and distro version from which the package was compiled for.
# rpm -qf /etc/sysconfig/netconsole
~~~~~~~~~~~~~~~~~~~~~~
initscripts-8.60-1
~~~~~~~~~~~~~~~~~~~~~~
Sure you get the idea.
Identify From Which Package Name a Directory Folder Belongs To
Now, how to get the package name a folder belongs to you asked? The concept should be the same, using rpm to query the package name a directory folder belongs to? That is, which package created and installed an existing folder from your box?
Some interesting examples.
# rpm -qf /dev/shm
# rpm -qf /var/named/chroot/etc/
# rpm -qf /dev/null
Identify From Which Package Name A Binary is Part of
# rpm -qf /usr/bin/whoami
# rpm -qf `which whoami`
Result:
~~~~~~~~~~~~~~~~~~~~~~~~
coreutils-6.9-12.fc8
~~~~~~~~~~~~~~~~~~~~~~~~
Carry on.
Some Readings:
Kernel Devel Headers HowTo
More Multimedia Plugins HowTo
Fedora and RHEL Differences
Microsoft Fonts on Fedora 8 HowTo
Livna Repository on Fedora 8 HowTo
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2008
(2301)
-
▼
January
(49)
- HowTo: Brasero
- HowTo: ISOs Management for Fedora
- HowTo: Install Nmap with GUI FrontEnd
- HowTo: Create and Manage Genealogy Family Tree via...
- HowTo: Install KFTPGrabber FTP Client
- HowTo: Install FileZilla 3 on Fedora 8
- HowTo: Be Alerted via Popups When Monitoring Log F...
- HowTo: Mount Windows Drive From Linux GUI
- HowTo: Delete Files With 0K Filesize Recursively
- HowTo: Changing Interface's MTU Size
- HowTo: Create Vanishing Virtual Drive
- HowTo: Install Identity.pub Into Remote Machines
- HowTo: Check and Mark Bad Block Of Hard Disk
- HowTo: Install Linux Hardware Browser
- HowTo: Basic RPM Package Queries And Usage
- HowTo: Rebuild Locked Out RPM Database
- HowTo: Display RPM Packages Installed Last Month
- HowTo: Display and List Out All Package Files Rece...
- HowTo: Identify Source Package Name Of A File or F...
- HowTo: Delete Extra Spaces Between Words From Files
- HowTo: Find Hidden Directory Folders Recursively
- HowTo: Create Hidden Directory Folder
- HowTo: Print Only Lines of Text File with N charac...
- HowTo: Sort Files by FileSize and What Else?
- HowTo: Squeezed Out Multiple Lines From Text File
- HowTo: Prevent Binary Execution From Mounted Device
- HowTo: Determine Domain's Expiration Date From Lin...
- HowTo: Create and Overwrite Existing Alias
- HowTo: Get MAC Address of PCs Around
- HowTo: List Out Hidden Files and Hidden Directory ...
- HowTo: Identify Valid Login Shells
- HowTo: Deny User from Logging Into Your System
- HowTo: Remove Tabs From Text Files Completely
- HowTo: Convert Tabs In Each File To Spaces
- HowTo: Install and Say Cheese
- HowTo: Install HomeBank and Manage Personal & ...
- HowTo: Install Mind-Mapping LabyRinth Tool
- HowTo: Install VMWare Server on Fedora 8
- HowTo: Install VMWare Workstation on Fedora 8
- HowTo: Virtual PCLinux 2007 via VirtualBox over Fe...
- HowTo: Enable PortMap on Fedora 8
- HowTo: Linux Hardware Lister Tool - LsHw
- HowTo: Install Bandwidth Shaper - Trickle on Fedora
- HowTo: VnStat Long-Term Traffic Monitoring via CLI
- HowTo: Install NetSpeed Traffic Monitoring Applet
- HowTo: Install IPTraff LAN Monitoring Tool
- HowTo: Install Ibmonitor Interface Bandwidth Monitor
- HowTo: Install IfTop Bandwidth Monitoring Tool
- HowTo: Fedora WordPress Installation
-
▼
January
(49)
Friday, January 18, 2008
HowTo: Identify Source Package Name Of A File or Folder
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment