Hacker Newsnew | past | comments | ask | show | jobs | submit | more reactjavascript's commentslogin

I just want my entire file system stored in Sqlite so I can query it myself


Oh hey look what I just found https://github.com/narumatt/sqlitefs


>> "mount a sqlite database file as a normal filesystem"

I'm looking to do the opposite. Given a location, recurse it, stat() each file and create the database.


If you happen to be using macOS, there's mdfind, which uses the spotlight database which is always kept up to date, unlike locate/updatedb, where updatedb is expensive to run, even if you've run it recently.

I have yet to find a good solution for linux CLI... something that uses an internal database that is kept up to date with all directory structure changes.

Maybe someone else has seen something cool for this? :D


It's still not clear to me whether you want the files inside the database or just the metadata. The stat part suggests the latter?

I guess I can see that, but now you have cache invalidation (someone else linked to Spotlight, which does this as a background process). SQLite files can be larger than any physical medium you can purchase so why not go the distance?


You could also make it as a Sqlite virtual table so it's dynamic.

Also file data is available in osquery: https://osquery.io/schema/5.2.3/#file


updatedb/locate?


updatedb is expensive to run and is usually run by a cron job, whereas something like mdfind on macos uses spotlight, which is kept up to date with all filesystem changes (or at least reasonably fast).

Anybody know of something like that for linux?


I'm shocked so many people forget this



Sounds like macOS would be right up your alley then.


I have MacOS, where is the sqlite file?


/private/var/db/Spotlight-V100/...


Is the parent post referring to `mdfind` perhaps?


Believe so.



I won't miss the Mandatory Fun Corporate T-Shirt. What a waste of resources. Printed up and shipped halfway around the world to be used one day and then donated to Goodwill. Let's do better!


Teachers, nurses, and janitors


Imagine that even with a warp drive, we are stuck in this little “air bubble” in the ocean


I've seen many companies with a Confluence page of "important links", this is often provided to developers and employees during onboarding. It is maintained and kept up to date.


Yeah I just don't feel it scales that well when there are so many links.


It's unfortunate that feelings about masks are framed as "hate". You don't have to love them, or hate them. You just need to use them as much as possible, indoors.

I frame mask-wearing as "love", in the sense that I love being alive and healthy and I want others to have the same.


> I frame mask-wearing as "love", in the sense that I love being alive and healthy and I want others to have the same

This represents everything that's wrong with the world right now. Your attitude, and covid fanaticism in general is destroying lives, and you frame it as "love" and helping people. Stop projecting your superstition and fear onto others


COVID is the third leading cause of death in the USA.

But I suppose you’ll tell me that it isn’t in general destroying lives.

Or strangling the economy.

Or putting the healthcare system at risk.

Nope, it’s all good. Spread the Covid, everyone, it’s harmless!


In Singapore, mask wearing is now optional outdoors. But I still see a majority of people (including myself) wear masks while outdoors.

I suppose this may mean that Singapore is moving towards the way the Japanese wear masks, which was well before COVID-19 hit.


Seeds. Like for plants. Life is the most amazing technology out there.


As a county resident, I also started doing this recently, and I am amazed how much organic waste we were throwing away previously. My regular trash can takes much longer to fill, and I am constantly taking out the little kitchen bin (that was provided by the waste company).


Or, make it so I can do my own "diff". In other words, teach me how to fish. Make the information discoverable.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: