Nice! I'm actually working on a similar project to push lsof and files from /proc into some postgres tables. Lets me do cool things like query log files across a ~6000 server infrastructure similar to: SELECT distinct(l.name) FROM lsof l, lsofer_runs r WHERE l.lsofer_id = r.id AND fd_type = 'REG' AND l.fd ~ '[0-9][uw]' AND l.name like '%log' GROUP BY l.name, r.hostname ORDER BY name Best of luck!
so you're rewriting osquery? https://osquery.io/
Show HN: FSQL – Search through your file system with SQL-esque queries
61–70 of 132 posts
Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#62Seems if the query is always going to start with SELECT, that maybe it should be assumed? I would never use this though, ack or find seem sufficient to me.
It would be nice to omit the select and the quoting; my suggestion would be that
fsql "select * from ..."
could be written as select all from ...
and all could be assumed if ommitted; so you could write select from
or just from ...
But unfortunately `select` is a sh(1) reserved word and `from` is an existing command! (shows who who your mail is from)So maybe select and from could be shortened to sel and frm.
Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#63Nice project, wish you the best ! Although tbh, I personally won't use this simply because I know enough of find(1) to not see the cognitive overhead of switching to sql to do filesystem /queries/. Any examples where this would be better than using find (with the occasional filter thrown in) ?
Contrariwise, I rarely see a non-trivial `find` invocation that does not have a few bugs. (including my own!)
Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#64For those of us on Windows: Everything [1] does the job quite nicely with much less verbose syntax. [1] http://voidtools.com
I'd really like to know why Microsoft can't do something like this in Windows itself. Everything is very useful.
Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#65I wanted to write the exact opposite: a Mysql/Postgres client as a FUSE filesystem driver. Namespaces -> folders, tables -> (editable) CSV files, stored procedures and settings accessible as (editable) plain text files.
Sounds dangerous!
Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#66Does anyone remember WinFS (1)? Bill Gates described it as his biggest product regret (2). I remember I thought it was brilliant. Too bad it was probably a little bit too futuristic for its time, as for a few other things they launched when it just was not the right time... the clunky Tablet PCs (3) were for sure another example. (1) https://en.m.wikipedia.org/wiki/WinFS (2) http://www.zdnet.com/article/bill-gates-bi…
Also see the Pick operating system.
Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#67Does anyone remember WinFS (1)? Bill Gates described it as his biggest product regret (2). I remember I thought it was brilliant. Too bad it was probably a little bit too futuristic for its time, as for a few other things they launched when it just was not the right time... the clunky Tablet PCs (3) were for sure another example. (1) https://en.m.wikipedia.org/wiki/WinFS (2) http://www.zdnet.com/article/bill-gates-bi…
That was my first thought, too. I'd love a file system that was more like a relational database. Also see the Pick operating system.
In some ways, Microsoft is on the way there with the way PowerShell works, and the ability to script things through OS functions that return objects which can be queried. If we ever see a WinFS, it would be very powerful combined with PowerShell
Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#68Re: Show HN: FSQL – Search through your file system with SQL-esque queries
#69Earlier quoted context omitted.
so you're rewriting osquery? https://osquery.io/
His description sounded like it would do joins across different hosts. Osquery looks to be single host at a time only.
I'm specifically writing it to find any log file that isn't being pushed into our third party logging service. It's a surprisingly difficult problem, especially considering the amount of tech sprawl that's accumulated. Since it's also a relatively low latency environment, it has to be written in a way that doesn't add too much load (without core isolation..).