LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-05-2004, 04:59 PM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
How do you determine which package owns a particular file?


Eg. I need to to know which package owns file A.

a) If the package is already installed, what command (Eg.dpkg, apt-get, apt-cache, etc) can I use?

b) If the package is not yet installed, what command can I use?

Thanks.
PS. Google search is another way, but just trying to know if there is a neater way in Debian
 
Old 04-05-2004, 05:39 PM   #2
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
a)
dpkg -S filename

Ex.

#dpkg -S /bin/cat
#textutils: /bin/cat

Alternatively, you could try dlocate

b)
If the package hasn't been installed, there would be no need since no files from that package exist in the system. To display the contents of the package you could use dpkg -c packagename, but you would have to have downloaded the *.deb package

Last edited by comp12345; 04-20-2004 at 12:54 PM.
 
Old 04-05-2004, 06:06 PM   #3
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
Eg. while compiling, it complains that glib-1.0 is missing or not found.

I would assume the package owning this file has not been installed yet. How do I get about determining which package (that is available from my various sources in sources.list) owns the required glib-1.0 file?

Thank you !

Quote:
Originally posted by comp12345
a)
dpkg -S filename

Ex.

#dpkg -S /bin/cat
#textutils: /bin/cat


b)
If the package hasn't been installed, there would be no need since no files from that package exist in the system. To display the contents of the package you could use dpkg -c packagename, but you would have to have downloaded the *.deb package
 
  


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
Determine what files are in what package? encomium Slackware 11 04-30-2009 04:59 PM
How do I determine file system type? lowpro2k3 Linux - General 5 07-09-2005 03:40 PM
How to determine file system block size? provo1234 Linux - Newbie 2 02-14-2005 09:30 AM
How does KDE determine file type? vdemuth Linux - Software 4 01-08-2005 04:08 AM
how do i determine my file system? Pete Dogg Linux - Software 3 10-16-2003 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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

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
Open Source Consulting | Domain Registration