jeudi 30 avril 2015

Which solution is better in my Almquist Shell script (under busybox) : Pure SQLite or (sort + diff + SQLite)?

I need some advices regarding the tools that I should use in my SH scrip. The purpose of this script is to display the new/deleted/edited/renamed files of a directory between to executions.

My approach is to store a sorted "file + attributes" list and compare it with the previous execution. My implementation uses a "find", a "sort" and a "diff" commands, and on top of that I use SQLite for storing the differences and do SQL requests for displaying what I want.

There's an other implementation that would be to store the files + attributes directly in a SQLite database and make SQL requests for getting what I need.

My question is : Which solution is better for supporting a loooot of files ? the slow sort command with the fast diff command ? Or letting SQLite doing all that for me ?

NB: I discard "inotify" because it is not available by default

Thanks for your advices

Aucun commentaire:

Enregistrer un commentaire