Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Just a basic question on this utility... I did

sudo apt-get install libhtmlparser-java

And I would like to see the source I just downloaded. On Linux (Ubuntu) where ought I look for this?

share|improve this question
2  
askubuntu.com is part of StackExchange... It's perfect place for questions like this... :) – PrimosK May 25 '12 at 21:08
Wow.. Didn't know for that one.. +1 – PrimosK May 25 '12 at 21:13

migrated from stackoverflow.com May 29 '12 at 7:35

2 Answers

dpkg -L libhtmlparser-java

For the source:

apt-get source libhtmlparser-java
share|improve this answer
Perfect. Dumb follow-up until I have time to actually learn pkg management tools better, how to find the source after apt-get source? – djechlin May 25 '12 at 21:08
It's in a sub-directory the current directory (you'll also see the tarball and diff used to extract it). :) – Matthew Flaschen May 25 '12 at 21:10

"apt-get install" installs compiled packages, not source. To see exactly what files were installed (and where they went), make sure your /etc/apt/sources.list has the "deb-src" equivalent entries for all of your "deb" entries (for the default entries you start with, this will be a matter of uncommenting the deb-src entries, if I recall correctly) and:

sudo apt-get install apt-file
sudo apt-file update
apt-file list libhtmlparser-java

As Matthew Flaschen notes above, you can get the source with "apt-get source", but that's like a wget -- it just puts it in your current directory. When I do this, I put it in /usr/local/src.

Edited: I should note that for installed packages, dpkg -L packagename will get you the list of files. You'd want apt-file to be able to list the files in uninstalled packages, or to search packages for a given file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.