HN Hall of Fame Weekly email

Fixing Unix Filenames (2012)

www.dwheeler.com Essays & writing Essays & articles Software engineering Candidate
Screenshot of www.dwheeler.com captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 10 calendar years, with breakout response in 2 of them.

submissions
15
submitters
15
observed span
2009–2026
peak thread · 96 comments
107 pts
latest 20+ return · 2019-03-17
94 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

Half of these problems are problems with the shell and have nothing to do with the filesystem. The shell is really, really, really bad about doing things like expanding spaces in filenames or environment variables into separate arguments. Notice that every example here about how it's "wrong" is a small shell script that has unexpected behaviour. That's mostly because the shell is wrong! > Oh, and don’t display filenames. Filenames could contain control characters that control the terminal (and X-windows)…

$ curl https://dwheeler.com/essays/fixing-unix-linux-filenames.html > /tmp/page.html $ grep -c '"$@"' /tmp/page.html 0 $ grep -c '$@' /tmp/page.html 0 For some reason this article talks about lots of incorrect metho9ds of handling filenames in Bourne shell, and completely ignores the correct solution that fixes a lot of the problem: always use double quotes, and iterating over "$@".

pdkl95·94-point thread·

This rant misplaces its frustration. This is not a problem with unix filesystems, this is a problem with Bourne Shell scripts, and with UNIX argument parsing semantics. Bourne shell is notorious for its problematic quoting, both of filesystem data and of any data from any other source. Every example in which he described a problem with a filename parameter could just as well be a problem with a non-filename parameter. The correct solution is to not program complicated scripts in…

fffggg·52-point thread·

The problem is not in the filesystem, it's in the shell. Stop writing shell scripts for tasks that need to be robust! None of these problems hit you when using a better programming language like Python. (Yes, Python 3 has a bit of an impedance mismatch between its native Unicode string type and the filesystem, but that just makes for slightly uglier code, not actual bugs)

catern·15-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
304

reference only — not used in Hall rules or ranking

Total comments
230

reference only — not used in Hall rules or ranking

Every submission