Find files associated with a package using Ubuntu | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Find files associated with a package using Ubuntu

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-05-2012
metallica1973 metallica1973 is offline
Registered User
 
Join Date: Dec 2007
Last Activity: 7 July 2014, 5:14 PM EDT
Location: Washington D.C
Posts: 174
Thanks: 17
Thanked 2 Times in 2 Posts
Find files associated with a package using Ubuntu

Stupid question of the day.

How can I find a file that is associated with a package installed on my Ubuntu 12.04 desktop. More clarification, so if I:

PHP Code:
lsof -p 11399
java    11399 davider  mem    REG        8
,6   438211   265067 /usr/lib/java/jre1.7.0_07/lib/i386/libt2k.so 
How can I find the program that this file is associated with?
Sponsored Links
    #2  
Old 10-05-2012
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 20 August 2014, 3:47 PM EDT
Location: Southern NJ, USA (Nord)
Posts: 4,398
Thanks: 8
Thanked 536 Times in 515 Posts
That line says someone is running java in that process 11399, which dynamically linked to this library in the jre7.0_07 package, so between more 'lsof' and a wide 'ps' you can find out what they ran and all the files currently open. The truss/tusc/strace tool for your OS can be attached with -p by same user or root to see what system calls it is running. However, past opens for config or data now closed are not disclosed, nor future opens for config, data or dynamic libs.
Sponsored Links
    #3  
Old 10-05-2012
metallica1973 metallica1973 is offline
Registered User
 
Join Date: Dec 2007
Last Activity: 7 July 2014, 5:14 PM EDT
Location: Washington D.C
Posts: 174
Thanks: 17
Thanked 2 Times in 2 Posts
Thanks for the reply, I meant the file

PHP Code:
/usr/lib/java/jre1.7.0_07/lib/i386/libt2k.so 
how can I find out what java Ubuntu package this belongs too from the deb package archive on my desktop?

I think I figured it out:

PHP Code:
sudo dpkg -S Unix.pm
perl
-modules: /usr/share/perl/5.14.2/ExtUtils/CBuilder/Platform/Unix.pm
perl
-modules: /usr/share/perl/5.14.2/Module/Build/Platform/Unix.pm
perl
-base: /usr/lib/perl/5.14.2/File/Spec/Unix.pm
liburi
-perl: /usr/share/perl5/URI/file/Unix.pm
perl
-modules: /usr/share/perl/5.14.2/ExtUtils/MM_Unix.pm
libdatetime
-timezone-perl: /usr/share/perl5/DateTime/TimeZone/Local/Unix.pm 
Thanks for the help
    #4  
Old 10-05-2012
Lem Lem is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 13 June 2014, 10:20 AM EDT
Location: Lombardia, Italy
Posts: 182
Thanks: 5
Thanked 38 Times in 38 Posts
dpkg -S is fine to search, as you wrote, among installed packages.
A more generic search can be performed using apt-file search .
--
Bye
Sponsored Links
    #5  
Old 10-09-2012
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 20 August 2014, 3:47 PM EDT
Location: Southern NJ, USA (Nord)
Posts: 4,398
Thanks: 8
Thanked 536 Times in 515 Posts
If you use 'yum', it has a variety of similar searches, for those in rpm land: yum
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
ubuntu 10.10 quilt package chercheur857 UNIX for Dummies Questions & Answers 1 05-31-2012 06:17 AM
Installing md5 package into ubuntu jremio Ubuntu 2 01-27-2012 12:52 PM
How to Install TCSH package in Ubuntu 11? animesharma Ubuntu 12 08-03-2011 11:01 PM
How to find dependancies of .dstream package (Solaris) & .rpm package( linux) yb4779 UNIX for Advanced & Expert Users 0 03-09-2011 04:54 AM
unable to install package on Ubuntu smartgupta Ubuntu 3 11-04-2010 09:30 AM



All times are GMT -4. The time now is 01:32 AM.