I need to install some proprietary package from some vendor (i.e. nvidia, cisco, ...). I have some binary installation file which copy files to my filesystem during installation (to /usr/share/, /etc/, /usr/bin/, ...). But I don't know what and where exactly. When I want to install this APP there is not uninstall binary file and there could be problem with removing files of APP.

Is in Linux some tool(s) which can track where files are copied?

I would like to find some general solution without dependence on Linux distribution. My vision is something like track ./install.bin and output will be files which were manipulated.

On system I don't have tools like locate.

  • Please let us know which Linux distribution you have so that we know which package manager you use. – Ned64 Mar 28 '18 at 10:07
  • 1
    Why not use find? With POSIX compliant options, you could use it in all distros – Inian Mar 28 '18 at 10:08
  • @Inian You are right and had the same idea as me, was typing the answer and did not see your comment. – Ned64 Mar 28 '18 at 10:21
  • I'm using Arch Linux but I would like to have some solution independent on Linux distribution. – waldauf Mar 28 '18 at 10:40
  • For the record, this was also on Stack Overflow but is closed now: stackoverflow.com/questions/49530061/… – tripleee Mar 28 '18 at 13:42

Simplest way: find.

The easiest method (easiest meaning, no extra tools to install, easy to type in) would be to save a list of all files before and after the install, then compare the lists.

You could type

find / -xdev \( -name home -o -name mnt -o -name proc --o -name dev o -name sys \) -prune -o -print | sort > /root/files-before-install

Then install your program and

find / -xdev \( -name home -o -name mnt -o -name proc -o -name dev -o -name sys \) -prune -o -print | sort > /root/files-after-install

(please note the other file name at the end)

Afterwards you can compare the files like this:

diff /root/files-before-install /root/files-after-install

This will show you only new files, not changed files - this would be much more complex to detect. There is also a non-zero chance that your installation program will create a file or directory with the name "home", "mnt", "sys", "proc" or "dev" which we would ignore, but the chances for this are pretty low in my opinion.

  • I hoped for some "finished tool" but your solution is general and useful on all distributions. Thx for your answer. – waldauf Mar 28 '18 at 10:45

Checkinstall works exactly like you describe: it monitors file system changes performed by an installer process, and provides a way to roll them all back.

There are ways to turn the installation transcript into a regular package for a number of platforms (.deb, RPM, etc) but the tool is useful even if you don't want that, or your package manager isn't directly supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.