TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

341 pointsby kshvmdnabout 8 years ago

25 comments

crivabeneabout 8 years ago
Does anyone remember WinFS (1)?<p>Bill Gates described it as his biggest product regret (2).<p>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.<p>(1) <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;WinFS" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;WinFS</a><p>(2) <a href="http:&#x2F;&#x2F;www.zdnet.com&#x2F;article&#x2F;bill-gates-biggest-microsoft-product-regret-winfs&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.zdnet.com&#x2F;article&#x2F;bill-gates-biggest-microsoft-pr...</a><p>(3) <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Microsoft_Tablet_PC" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Microsoft_Tablet_PC</a>
评论 #14346406 未加载
评论 #14346858 未加载
评论 #14348053 未加载
评论 #14345922 未加载
misterdataabout 8 years ago
For those of us on Windows: Everything [1] does the job quite nicely with much less verbose syntax.<p>[1] <a href="http:&#x2F;&#x2F;voidtools.com" rel="nofollow">http:&#x2F;&#x2F;voidtools.com</a>
评论 #14344928 未加载
评论 #14347893 未加载
评论 #14345369 未加载
评论 #14345070 未加载
评论 #14348271 未加载
评论 #14347328 未加载
评论 #14349045 未加载
评论 #14344716 未加载
评论 #14344626 未加载
评论 #14345151 未加载
rekwahabout 8 years ago
Reminds me of osquery [0].<p>[0] - <a href="https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;osquery" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;osquery</a>
评论 #14344549 未加载
评论 #14344503 未加载
评论 #14345333 未加载
bangonkeyboardabout 8 years ago
On macOS, there is a query syntax [0] that&#x27;s usable in Spotlight and the mdfind(1) command. Richer searchable attributes [1], but the results may have to be piped through other tools for formatting or other output.<p>[0]: <a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;content&#x2F;documentation&#x2F;Carbon&#x2F;Conceptual&#x2F;SpotlightQuery&#x2F;Concepts&#x2F;QueryFormat.html" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;content&#x2F;documentation&#x2F;Ca...</a><p>[1]: <a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;content&#x2F;documentation&#x2F;CoreServices&#x2F;Reference&#x2F;MetadataAttributesRef&#x2F;Reference&#x2F;CommonAttrs.html" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;content&#x2F;documentation&#x2F;Co...</a>
m0skit0about 8 years ago
I think SQL is too verbose for use on the terminal. find + grep does the trick with way less verbose syntax (but also probably less readable). With that said, it is quite cool.
评论 #14344491 未加载
CaseFlatlineabout 8 years ago
Don&#x27;t see it offhand so asking:<p>1) How&#x2F;where are you storing the index 2) Have you tried this on large (30+ TB filesystems)?
评论 #14345079 未加载
atemerevabout 8 years ago
I wanted to write the exact opposite: a Mysql&#x2F;Postgres client as a FUSE filesystem driver. Namespaces -&gt; folders, tables -&gt; (editable) CSV files, stored procedures and settings accessible as (editable) plain text files.
评论 #14346635 未加载
评论 #14349381 未加载
评论 #14345522 未加载
m00s3about 8 years ago
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.
评论 #14344675 未加载
评论 #14345753 未加载
评论 #14346362 未加载
评论 #14364884 未加载
aardvark291about 8 years ago
Didn&#x27;t BeOS have some awesome database-like file system indexing and query system?
评论 #14344757 未加载
jklehmabout 8 years ago
Reminds me of WSSQL [0] on Windows.<p>[0] <a href="https:&#x2F;&#x2F;msdn.microsoft.com&#x2F;en-us&#x2F;library&#x2F;windows&#x2F;desktop&#x2F;bb231255(v=vs.85).aspx" rel="nofollow">https:&#x2F;&#x2F;msdn.microsoft.com&#x2F;en-us&#x2F;library&#x2F;windows&#x2F;desktop&#x2F;bb2...</a>
ziikutvabout 8 years ago
find&#x2F;grep&#x2F;awk&#x2F;ag get me a long way to be honest. However, I think this is a cool project because it makes filtering of file attributes (such as size) so much easier. No need for splitting strings and using regex. Cheers.
评论 #14345468 未加载
devnonymousabout 8 years ago
Nice project, wish you the best ! Although tbh, I personally won&#x27;t use this simply because I know enough of find(1) to not see the cognitive overhead of switching to sql to do filesystem &#x2F;queries&#x2F;.<p>Any examples where this would be better than using find (with the occasional filter thrown in) ?
评论 #14344493 未加载
评论 #14345847 未加载
vondurabout 8 years ago
I think the BeOS had a file system that was set up like a database that could be queried.
评论 #14346585 未加载
samskabout 8 years ago
We have implemented smth. like this with sqlite extension, pretty powerful, with all the goodies sqlite (and its extensions) provides...
评论 #14344570 未加载
amasadabout 8 years ago
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:<p>&gt;eventually every system that contains information that can be queried will have a sql interface
评论 #14344728 未加载
评论 #14344730 未加载
评论 #14345409 未加载
bpchapsabout 8 years ago
Nice! I&#x27;m actually working on a similar project to push lsof and files from &#x2F;proc into some postgres tables. Lets me do cool things like query log files across a ~6000 server infrastructure similar to:<p><pre><code> SELECT distinct(l.name) FROM lsof l, lsofer_runs r WHERE l.lsofer_id = r.id AND fd_type = &#x27;REG&#x27; AND l.fd ~ &#x27;[0-9][uw]&#x27; AND l.name like &#x27;%log&#x27; GROUP BY l.name, r.hostname ORDER BY name </code></pre> Best of luck!
评论 #14344487 未加载
评论 #14346988 未加载
评论 #14344534 未加载
Jaruzelabout 8 years ago
This is nice, but what I&#x27;m actually looking for is a lightweight clone of SharePoint Search[1].<p>Something that has a self-hosted Web Interface, and an engine that I can point at some file servers, and let it index the files to it&#x27;s hearts content. All I then have to do is search the index &#x27;google style&#x27; for my files.<p>Any suggestions?<p>--<p>[1] <a href="https:&#x2F;&#x2F;i-technet.sec.s-msft.com&#x2F;dynimg&#x2F;IC423463.jpg" rel="nofollow">https:&#x2F;&#x2F;i-technet.sec.s-msft.com&#x2F;dynimg&#x2F;IC423463.jpg</a>
zitterbewegungabout 8 years ago
This is really neat. MacOS has a easy to use smart folder which I use to find recent files and large files. An interface like this is an advantage because it&#x27;s easy to understand what it&#x27;s doing and it&#x27;s cross platform . Other people make the claim it may be verbose (but being verbose makes the operation clearer) and SQL is so familiar to programmers that are power users.
jstimpfleabout 8 years ago
<i>FROM dir1, dir2</i> doesn&#x27;t mean the same as in SQL. In SQL that&#x27;s a join of dir1 and dir2, but here it&#x27;s a union.
评论 #14344382 未加载
rodorgasabout 8 years ago
I never know when I have to use find vs grep. And linux grep is different from macOS grep so I google about it every day lol. I just never figure it out. I think I&#x27;ll be a heavy user of FSQL.
legulereabout 8 years ago
Reminds me a bit of SPARQL, that is used on the linux desktop e.g. by Gnome Music to find your music collection through Gnome Tracker
gigatexalabout 8 years ago
Kudos to the authors for taking an idea I&#x27;ve had for a while and actually doing it. Very, very cool.
drinchevabout 8 years ago
Really cool idea, but I&#x27;m really missing the WHY section in the Readme file.<p>Thinking about a use case is quite hard. Anyone?
rs86about 8 years ago
Really cool idea
adamhepnerabout 8 years ago
This is exactly why I love PowerShell.