Live data from Hacker News

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

github.com

21–30 of 132 posts

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

#23
Did someone come up with a generalized rule about putting SQL on top of every possible system that contains queryable information? Here is first-pass:

>eventually every system that contains information that can be queried will have a sql interface

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

#25
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.

It's a shame Bash used 'select' as an elaborate menu built-in - it'd be quite neat to name the binary that (and drop the quotes). The you could just type the query right into your prompt!

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

#26
post #19
post #15

Earlier quoted context omitted.

Subselects would be a pretty awesome feature. "select name from foo where name not in (select name from ../bar where date I'm usually fine with `find`, but when doing things more interesting than just "find files in this directory that are not in that directory", while uncommon, tend to make me think about my pipeline a bit.

Out of curiosity, I'm interested in how folks would do the "in this not that" folder query. At a gut shot, I'd assume that diff would be used. I'm about to dig through the find man page to see if it has something directly to help.

Assuming no dups in file1, this outputs lines in file1 that aren't in file2:

    sort file1 file2 file2 | uniq -u
(double file2 is not a typo :)

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

#28
post #25
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.

It's a shame Bash used 'select' as an elaborate menu built-in - it'd be quite neat to name the binary that (and drop the quotes). The you could just type the query right into your prompt!

You could use an alias. They're case sensitive so SELECT could be mapped without impacting the built in "select".

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

#29

For those of us on Windows: Everything [1] does the job quite nicely with much less verbose syntax. [1] http://voidtools.com

Does it keep everything local?

I couldn't find anything on the FAQ and I remember a similar tool posted here on HN and people complained that it called home for some search functionality.

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

#30
post #23

Did someone come up with a generalized rule about putting SQL on top of every possible system that contains queryable information? Here is first-pass: >eventually every system that contains information that can be queried will have a sql interface

That's just a lemma in the wider theorem that every sufficiently complicated application evolves to have ad-hoc SQL reports exported to Excel.
Post reply on HN