<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>#unix posts — Ben Crowder</title>
    <link>https://bencrowder.net/blog/tag/unix/</link>
    <atom:link href="https://bencrowder.net/blog/tag/unix/feed/" rel="self" />
    <description>Feed for blog posts tagged with #unix.</description>
    <lastBuildDate>Fri, 17 Apr 2026 23:19:59 GMT</lastBuildDate>
    <language>en-US</language>
    <generator>https://bencrowder.net/</generator>

    <item>
      <title>Links #4</title>
      <link>https://bencrowder.net/blog/2020/links-4/</link>
      <guid isPermaLink="true">https://bencrowder.net/blog/2020/links-4/</guid>
      <pubDate>Thu, 13 Aug 2020 12:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Ben Crowder]]></dc:creator>
      <description><![CDATA[<ul>
<li><a href="https://en.wikipedia.org/wiki/Lycurgus_Cup">The Lycurgus Cup</a> — ancient glass cup that changes color</li>
<li><a href="https://www.bu.edu/mahoa/hale_art.html">William Hale’s essay on the art of reading Latin</a> — I first read this long ago when I started studying Latin, good advice</li>
<li><a href="https://www.robinrendle.com/notes/in-defense-of-a-fussy-website">Robin Rendle’s post in defense of fussy websites</a> — some interesting thoughts</li>
<li><a href="https://briancallahan.net/blog/20200808.html">Brian Callahan’s writeup on how argc and argv get passed in</a> — more assembly goodness</li>
<li><a href="https://rachelbythebay.com/w/2020/08/09/lib/">Rachel’s article on tripping over the potholes in too many libraries</a> — and how it can be good to rely less on third-party libraries when programming (which I’m very much in favor of)</li>
</ul><hr class="feed-extra" style="margin-top: 48pt;" /><p class="feed-extra feed-mail"><a href="mailto:ben.crowder@gmail.com?subject=Re%3A%20Links #4">Reply via email</a></p>]]></description>
    </item>
    <item>
      <title>Came across fsql, which does SQL-like filesystem queries (an intriguing idea): fsql SELECT name FROM...</title>
      <link>https://bencrowder.net/blog/2017/521/</link>
      <guid isPermaLink="true">https://bencrowder.net/blog/2017/521/</guid>
      <pubDate>Fri, 19 May 2017 12:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Ben Crowder]]></dc:creator>
      <description><![CDATA[<p>Came across <a href="https://github.com/kshvmdn/fsql">fsql</a>, which does SQL-like filesystem queries (an intriguing idea):</p>
<pre>
fsql SELECT name FROM ~/Desktop, ~/Downloads WHERE name LIKE %csc%

fsql SELECT all FROM ~ WHERE file IS dir

fsql "name, size, time FROM . WHERE name LIKE %.js AND time > 'Apr 01 2017 00 00'"

fsql "FROM $GOPATH WHERE name = main.go AND (size >= 10.5kb OR size < 100)"
</pre>
<p>I like it.</p><hr class="feed-extra" style="margin-top: 48pt;" /><p class="feed-extra feed-mail"><a href="mailto:ben.crowder@gmail.com?subject=Re%3A%20Came across fsql, which does SQL-like filesystem queries (an intriguing idea): fsql SELECT name FROM...">Reply via email</a></p>]]></description>
    </item>
    <item>
      <title>Some small scripts</title>
      <link>https://bencrowder.net/blog/2013/some-small-scripts/</link>
      <guid isPermaLink="true">https://bencrowder.net/blog/2013/some-small-scripts/</guid>
      <pubDate>Tue, 05 Mar 2013 12:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Ben Crowder]]></dc:creator>
      <description><![CDATA[<p>Migrating to Day One has resurrected my efforts to scan and transcribe my older paper journals. As I’ve been doing this, I’ve run into the need for a couple small <a href="https://bencrowder.net/coding/scripts/">shell scripts</a> to automate things.</p>
<p>On several of these journals I’m scanning the full two-page spread because the whole journal fits on the scanner platen, which means splitting the resulting image out into two (one for each page). <a href="https://gist.github.com/bencrowder/5091137">Splitimage</a> uses ImageMagick to do that nicely. There’s some overlap, but for a fully automated solution it’s not bad, and it saves me a lot of time cropping.</p>
<p>I prefer taking these split images and renaming them sequentially using something more meaningful (“journal-2009.005.jpg” rather than “IMG_0034.JPG”, for example). I used to do this with OS X’s Automator tool, and it works quite well, but I wanted a quick command-line tool to speed things up. Enter <a href="https://gist.github.com/bencrowder/5091048">dub</a>, a zsh script that simplifies the batch renaming process. Now I can just type:</p>
<pre><code>dub journal-2009.X.jpg *.JPG
</code></pre>
<p>And then it’s just a matter of dumping them into Unbindery and transcribing them.</p><hr class="feed-extra" style="margin-top: 48pt;" /><p class="feed-extra feed-mail"><a href="mailto:ben.crowder@gmail.com?subject=Re%3A%20Some small scripts">Reply via email</a></p>]]></description>
    </item>
    <item>
      <title>Unix date magic</title>
      <link>https://bencrowder.net/blog/2012/unix-date-magic/</link>
      <guid isPermaLink="true">https://bencrowder.net/blog/2012/unix-date-magic/</guid>
      <pubDate>Mon, 24 Sep 2012 12:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Ben Crowder]]></dc:creator>
      <description><![CDATA[<p>The Unix <code>date</code> command has a cool feature I didn’t know about (hat tip to Dave C. for his comment about it on <a href="http://www.leancrew.com/all-this/2012/09/eight-days-a-week/#comment-24659">Dr. Drang’s blog</a>). Turns out you can add multiple <code>-v</code> options to adjust dates — for example, to get the date of last Friday:</p>
<pre><code>$ date -v -fri
Fri Sep 21 ... 2012
</code></pre>
<p>Or next Thursday:</p>
<pre><code>$ date -v +thu
Thu Sep 27 ... 2012
</code></pre>
<p>Or the next Tuesday after two weeks from today:</p>
<pre><code>$ date -v +2w -v +tue
Tue Oct 2 ... 2012
</code></pre>
<p>Or thirty seconds from now:</p>
<pre><code>$ date -v +30S
</code></pre>
<p>Or five hours ago:</p>
<pre><code>$ date -v -5H
</code></pre>
<p>Or ten years, a month, and three days from now (and no, I have no idea why you’d use something like that):</p>
<pre><code>$ date -v +10y -v +1m -v +3d
Thu Oct 27 ... 2022
</code></pre>
<p>And so on.</p><hr class="feed-extra" style="margin-top: 48pt;" /><p class="feed-extra feed-mail"><a href="mailto:ben.crowder@gmail.com?subject=Re%3A%20Unix date magic">Reply via email</a></p>]]></description>
    </item>
    <item>
      <title>Vim-fu</title>
      <link>https://bencrowder.net/blog/2012/vim-fu/</link>
      <guid isPermaLink="true">https://bencrowder.net/blog/2012/vim-fu/</guid>
      <pubDate>Thu, 14 Jun 2012 12:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Ben Crowder]]></dc:creator>
      <description><![CDATA[<p>Vim has a steep learning curve, but it’s worth it. Here’s a <a href="https://cdn.bencrowder.net/vim-fu/">cheat sheet</a> of sorts showing some of the more useful commands (I put it together for a presentation at work):</p>
<figure><a href="https://cdn.bencrowder.net/vim-fu/"><img src="https://cdn.bencrowder.net/images/2012/06/VimFu-580.png" alt="" /></a></figure>
<p>There’s still a lot more to Vim, of course. And by a lot I mean a huge, massive mountain of things. Our goal here was to introduce some of the basics of Vim and provide a foundation for learning more. <code>:help</code> is your friend.</p><hr class="feed-extra" style="margin-top: 48pt;" /><p class="feed-extra feed-mail"><a href="mailto:ben.crowder@gmail.com?subject=Re%3A%20Vim-fu">Reply via email</a></p>]]></description>
    </item>
    
  </channel>
</rss>
