How to find the files and directories that related to an executable file?
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to find the files and directories that related to an executable file?
Hello,
With "whereis" command, I can find the location of the binary, but how can I find the files and directories that related to that file? For example:
Code:
$ whereis firefox
firefox: /usr/bin/firefox
But, where are the files and directories that related to the Firefox?
On Debian-based systems, you can identify the package owning a file with "dpkg-query --search FILENAME" and then the other files provided by that package with "dpkg-query --listfiles PACKAGENAME"
more or less
1. you can find the package and you will see what files belong to that package (and most probably used by that app).2
2. ldd will show you the libraries used by the app (which are required to run it). But this list can be incomplete and changing (depending on the page you use).
3. lsof may show you the [currently] opened files, but this may also change over time
4. apps may have personal files somewhere inside your home
5. there can be a cache too.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.