> Just try these in Bash or PowerShell!
> select fullpath from files where fullpath like '%sublime%' and fullpath like '%settings%' and fullpath not like '%backup%';<p>This isn't a very good example, because it's trivial to do in bash:<p><pre><code> locate sublime | grep settings | grep -v backup
</code></pre>
(Replace `locate sublime` with `find / | grep sublime` if locate's results are too old.)<p>> select fullpath, bytes from files order by bytes desc limit 5;<p>This is better. Here it is in bash:<p><pre><code> find / -type f -exec stat -c '%s %n' {} \; | sort -nr | head -n 5
</code></pre>
Cherry picking another one that stood out to me.<p>> select writeln('/Users/SJohnson/dictionary2.txt', data) from fileslines where fullpath = '/Users/SJohnson/dictionary.txt' order by data;<p><pre><code> cd /Users/SJohnson/; sort dictionary.txt > dictionary2.txt
</code></pre>
Some of the rest of the examples are trivial in bash, and others look potentially useful. Of course they are trying to demonstrate its capabilities so the examples are contrived. I can see how this would be useful for someone who doesn't know the command-line, but as someone who is proficient in both SQL is pretty verbose.<p>In the real world I'd switch to a scripting language for some of the more complex cases, since they'd be rare.
Reminds me of facebook's <a href="https://osquery.io/" rel="nofollow">https://osquery.io/</a> does this offer anything different?
This is pretty cool, I have find myself wanting a tool like this for ages. However, does anyone know of a pure open source alternative (just for Linux) ?
This is a brilliant idea!<p>You can do most of the same kinds of things via find and grep and some shell foo, but honestly who can remember all of that? Maybe someone smarter than me, but every time I need it I am reading man pages.<p>The find syntax to get files modified more than 20 minutes ago? How can you remember that? But modified > now() - interval '5 minutes' (well that's postgres but still), I can remember it and I haven't used it in 2 or 3 years, because it's slightly less arbitrary and doesn't have 8 different gotchas.<p>EDIT:<p>find . -mmin -5 # that gets you files modified in the last 5 minutes. The part I can't ever remember:<p>find . -mmin +5 # that gives you files last modified more than 5 minutes ago<p>find . -mmin 5 # apparently this is files modified exactly 5 minutes ago? The fact that this syntax exists (and is different from +5) seems absurd to me. What is the resolution? It must be minutes. This option exists only to confuse people.
Log Parser does this too (Windows only). <a href="http://www.microsoft.com/en-us/download/details.aspx?id=24659" rel="nofollow">http://www.microsoft.com/en-us/download/details.aspx?id=2465...</a>
I've been looking for something like this (and thinking about developing something if I can't find a satisfactory solution) to use across many different hosts to identify duplicate files, etc. I've got media spread across many different linux and os x machines. Can crab handle this?
Makes me think of txt-sushi (<a href="http://keithsheppard.name/txt-sushi/" rel="nofollow">http://keithsheppard.name/txt-sushi/</a>). Can be pretty useful instead of using awk.
Reminds me of WinFS, which was cancelled but I always thought it was a brilliant concept.<p><a href="https://en.wikipedia.org/wiki/WinFS" rel="nofollow">https://en.wikipedia.org/wiki/WinFS</a>
Does this maintain an inode metadata index as well? Otherwise how will you avoid stat'ing the whole filesystem (or a branch thereof)?<p>Does it handle extended attributes?