Live data from Hacker News

Show HN: FSQL – Search through your file system with SQL-esque queries

github.com

61–70 of 132 posts

Re: Show HN: FSQL – Search through your file system with SQL-esque queries

#61
post #12

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/

His description sounded like it would do joins across different hosts. Osquery looks to be single host at a time only.

Re: Show HN: FSQL – Search through your file system with SQL-esque queries

#62
post #11

Seems 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.

Yeah, I like the idea of using sql but it is painful to write.

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

#63

Nice 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) ?

SQL is familiar-ish to a lot of people.

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

#64
post #42

For 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.

My guess is that MS needs an excuse to index the contents of your files.

Re: Show HN: FSQL – Search through your file system with SQL-esque queries

#65

I 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!

No more than DELETE FROM ... WHERE ... wait, where is WHERE?

Re: Show HN: FSQL – Search through your file system with SQL-esque queries

#66

Does 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.

Re: Show HN: FSQL – Search through your file system with SQL-esque queries

#67

Does 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.

Also MUMPS. See https://en.wikipedia.org/wiki/Pick_operating_system for info.

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

#69
post #61

Earlier 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.

Yep.

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..).

Post reply on HN