Simon Willison’s Weblog

16 items tagged “unix”

2022

Bugs in Hello World. If a Unix program attempts to send its standard output to /dev/full it should return an error code. Many classic “hello world” programs fail to correctly handle this case. # 15th March 2022, 6:14 am

2021

jc (via) This is such a great idea: jc is a CLI tool which knows how to convert the output of dozens of different classic Unix utilities to JSON, so you can more easily process it programmatically, pipe it through jq and suchlike. “pipx install jc” to install, then “dig example.com | jc --dig” to try it out. # 5th December 2021, 11:05 pm

2019

How FZF and ripgrep improved my workflow (via) I’m already a keen user of ripgrep (a crazy-fast grep alternative) but fzf was new to me: it’s a CLI utility that lets you pipe in a list of strings, then gives you a typeahead search interface to search and select a string before returning the selected string to stdout when you hit enter. This means you can pipe it together with other tools to add a dynamic selection step, which has all kinds of delightful combinations. “vi $(find . | fzf)” for example opens vi against the file you selected. # 5th July 2019, 5:51 pm

2017

Run the First Edition of Unix (1972) with Docker (via) This is so cool... just run “docker run --rm -it bahamat/unix-1st-ed” to drop into a simulation of a PDP-11 running genuine 1972 era Unix! If you haven’t got into Docker yet, Docker for Mac is a single click install these days and works incredibly well. # 22nd November 2017, 3:36 pm

fd (via) “A simple, fast and user-friendly alternative to find.” Written in rust, with a saner default command-line syntax than the regular find command. Microbenchmark shows it running 7x faster. Install it on OS X using “brew install fd”. # 8th October 2017, 9:27 pm

2010

Is it important for modern programmers to know how to use Unix? Why?

I’d say yes. If you do any kind of server-side development, Linux/Unix etc UNIX (links to: /topic/Unix), etc., is where most of the exciting innovation is happening. Tools like HadoopApache Hadoop (links to: /topic/Apache-Hadoop), RedisRedis (links to: /topic/Redis), MongoDBMongoDB (links to: /topic/MongoDB), nginxnginx (links to: /topic/nginx), git etc Git (links to: /topic/Git-version-control-1), etc., all come from a Unix UNIX culture, and not knowing your way around a command line makes it much harder to get to grips with them.

[... 110 words]

Running Processes. I’ve been searching for a good solution to this problem (“run this program, and restart it if it falls over”) for years. I’m currently using god which works pretty well, but according to this article I should be learning upstart instead. It never ceases to amaze me how difficult this is, and how obtuse the tools are. # 2nd March 2010, 9:55 am

2009

The Go Programming Language. A brand new systems programming language, designed by Robert Griesemer and Unix/Plan 9 veterans Rob Pike and Ken Thompson and funded by Google. Concurrency is supported by lightweight communicating processes called goroutines. “It feels like a dynamic language but has the speed and safety of a static language.” # 11th November 2009, 7 am

Python is Unix. Jacob ports Ryan Tomayko’s simple prefork network server to Python. # 7th October 2009, 11:43 am

I like Unicorn because it’s Unix. Ryan Tomayko analyses Unicorn, a new, pre-forking Ruby HTTP server that makes extensive use of Unix syscalls and idioms, and asks why dynamic language programmers don’t take advantage of these more often. # 7th October 2009, 11:42 am

shunit2 (via) xUnit style testing for shell scripts. # 27th September 2009, 7:34 pm

Perl 6: The MAIN sub (via) “Calling subs and running a typical Unix program from the command line is visually very similar: you can have positional, optional and named arguments.”—that’s exactly what I was thinking when I came up with optfunc. # 28th May 2009, 9:32 pm

python-daemon (via) A library for correctly creating Unix daemon processes in Python, implementing the proposed PEP 3143 API. # 18th May 2009, 10:12 am

A Unix Utility You Should Know About: Pipe Viewer. Useful command line utility that adds a progress bar to any unix pipeline. # 9th February 2009, 10:15 pm

2008

lns (via) “a friendly program for making symbolic links”—it’s ln -s but it does the right thing no matter what order you put the arguments in. Love it. # 20th October 2008, 11:42 pm

The Cron Commandments. How to write well-behaved cron scripts, from Dean Wilson. # 27th June 2008, 9:48 am