3 ms·
Sqlite does have the fileio extension, which includes an fsdir() function that will traverse a directory. sqlite> .headers on sqlite> .mode column sqlite
by tyingq 6y ago
Sqlite does have the fileio extension, which includes an fsdir() function that will traverse a directory.
sqlite> .headers on
sqlite> .mode column
sqlite> SELECT name,mode,mtime FROM fsdir("/usr") where name like '%.h' LIMIT 3;
name mode mtime
------------------------ ---------- ----------
/usr/include/_G_config.h 33188 1607359089
/usr/include/aio.h 33188 1607359089
/usr/include/aliases.h 33188 1607359089
It's not nearly as full featured as this Fselect tool, though. I'm somewhat surprised nobody has cloned or updated the extension and added more stat() fields or things like extended file attributes. It doesn't even have the file size.