1. cat /etc/modprobed_db.conf
  2. # Make sure that the user you plan to run the script as has r/w to the path!
  3. dbpath="/var/log" # no trailing /
  4. # Add modules in the ignore array that you do NOT want counted, for example
  5. # modules that get build by their respective package.
  6. ignore=(nvidia vboxdrv vboxnetflt vboxnetadp lirc_dev lirc_i2c)
  7.  
  8. ls -l /var/log
  9. total 36420
  10. drwxrwxrwt 4 root root 400 Apr 18 14:00 ./
  11. drwxr-xr-x 18 root root 440 Apr 14 14:10 ../
  12. -rw-r----- 1 root log 409 Apr 18 13:59 acpid.log
  13. -rw-r----- 1 root log 4540 Apr 18 20:32 auth.log
  14. drwxr-xr-x 2 root root 60 Apr 18 13:59 ConsoleKit/
  15. -rw-r----- 1 root log 66170 Apr 18 20:33 crond.log
  16. -rw-r----- 1 root log 18236516 Apr 18 20:33 daemon.log
  17. -rw-r--r-- 1 root root 56760 Apr 18 13:59 dmesg.log
  18. -rw-r----- 1 root log 1022 Apr 18 14:16 errors.log
  19. -rw-r----- 1 root log 18468681 Apr 18 20:33 everything.log
  20. -rw------- 1 root root 32032 Apr 18 13:59 faillog
  21. -rw-r----- 1 root log 107701 Apr 18 20:21 kernel.log
  22. -rw-r--r-- 1 root root 292292 Apr 18 13:59 lastlog
  23. -rw-r----- 1 root log 57509 Apr 18 20:33 mail.log
  24. -rw-r----- 1 root log 90884 Apr 18 20:32 messages.log
  25. -rw-r--r-- 1 mememe users 15207 Apr 18 20:29 mpdscribble.log
  26. -rw-r--r-- 1 root root 1039 Apr 18 20:32 pacman.log
  27. -rw-r----- 1 root log 82 Apr 18 13:59 syslog.log
  28. drwxr-xr-x 2 root root 60 Apr 18 13:59 wicd/
  29. -rw-r--r-- 1 root users 26442 Apr 18 13:59 Xorg.0.log
  30.  
  31. sudo modprobed_db
  32. No db present so making /var/log/modprobed.db
  33. The db currently contains this many records: 106
  34.  
  35. Which has ls -l /var/log create these two more lines:
  36. -rw-r--r-- 1 root root 979 Apr 18 20:34 modprobed.db
  37. -rw-r--r-- 1 root root 979 Apr 18 20:34 modprobed.long