Tool/script to gather info about installed files in system.
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
@vulcan59
1. pkgtool show content of ONE package, I need content of ALL packages.
2. It shows full content of file(s) in /var/log/packages, I need only file list only, w/o headers.
> Otherwise just list the contents of the files in /var/log/packages
As I already said, those files contain not only file list but package metadata also. I need file list only, excluding "./".
You can get a sorted overview of all files mentioned in /var/log/packages using this command:
Code:
(for III in `ls /var/log/packages` ; do sed '1,/^.\//d' /var/log/packages/$III ; done ) | sort
But remember, the files in /install are not copied into the computer's filesystem, they are used by pkgtools. Also several packages have a "incoming" directory or *.new files which are handled by a doinst.sh script so that the files will end up in different locations of your filesystem than you might think if you look at the package content.
Basically you need to tell us why you want this before we can give you a useful answer. Also, you might put your brain to work and come up with a command yourself which does what you want.
@Alien Bob
> But remember
I do remember all of /install, .new and incomming
> Basically you need to tell us why you want this before we can give you a useful answer.
Because my FS has a lot of garbage. I.e. packages installed not using pkgtool and some very stupid software which does not cares anything. Then I shall compare this list with content of my FS and annihilate garbage.
> Also, you might put your brain to work and come up with a command yourself which does what you want.
I have already wrote C program which creates such list. Can share. But I wonder if there is any existing tool(as I explicitly wrote in first message).
slackpkg has a "clean" option that will list all non stock Slackware packages. You could compare that list with the contents of /var/log/packages. Yet that option will not disclose all software that was installed. That option will only disclose which non stock Slackware packages have been installed. Using the "clean" option presumes having used the package manager.
Discovering software that was installed without using the package manager is challenging. For this same reason, recently I posted a query about a build script to wrap around the virtualbox run scripts. The point is not so much the dependability or trustworthiness of non package install scripts, but that knowing what was installed becomes a mess.
Possibly a script could query the contents of all bin directories and then grep /var/log/packages for those files. The difference would provide some clue about what was installed without the package manager. Unfortunately, some packages don't install bin files, such as perl add-ons.
Or a script that listed all files on a system and compared that list to the contents of all /var/log/packagges files. The difference would provide some clue of what was installed without the package manager.
Another possible option would be to install a stock Slackware system in a second real or virtual machine and then compare the contents of the two systems.
Currently there is no native Slackware tool or script to perform this task.
Or a script that listed all files on a system and compared that list to the contents of all /var/log/packagges files. The difference would provide some clue of what was installed without the package manager.
That is exactly what I doing now. I have result of "find /"(about 70MiB file list) and result of tool I seeking here(around 12MiB file list). Filtered both(or rather latest one) of well know garbage containers(/tmp,/var/log,/var/tmp,/root,/home,/var/cache etc) and doing "diff -u3" against them. As result I have .diff file every line insertion(+) of which show me not-controlled filesystem entries - my goal.
> Basically you need to tell us why you want this before we can give you a useful answer.
Because my FS has a lot of garbage. I.e. packages installed not using pkgtool and some very stupid software which does not cares anything. Then I shall compare this list with content of my FS and annihilate garbage.
> Also, you might put your brain to work and come up with a command yourself which does what you want.
I have already wrote C program which creates such list. Can share. But I wonder if there is any existing tool(as I explicitly wrote in first message).
Well if you used a tracking tool (like slacktrack, paco, src2pkg, etc.) whenever you install non Slackware packages it would be fairly easy.
@ruario, I already asked somewhere here about tracking tool. Unfortunately none of proposed solutions works for my cases.
And second, tracking tool probably suitable solution when installing software, but it is impossible to use it when software runs and leaves garbage.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.