Hacker News

Favorites Setup
Comment by zahlman | original | Things That Turbo Pascal Is Smaller Than (2011)
[−]zahlman · 2026-11-15 Sun 17:29 UTC · link
> the command basically creates an empty file or updates the file change date if the file already exists, not more.

GNU coreutils touch does a lot more than that. My local copy is about 95k; it allows for choosing from multiple different timestamps to update; suppressing the (default) creation of an empty file if it doesn't already exist; operating on symlinks directly rather than following them (if the system supports it); specifying a custom timestamp rather than "now" (including by parsing a date string), and of course outputting a help message and a version.

[−]regularfry · 2026-11-15 Sun 17:50 UTC · link
I was going to suggest that even that logic wouldn't account for a binary size three times the RAM of my first machine, but from the man page:

> DATE STRING

> The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. The date string format is more complex than is easily documented here but is fully described in the info documentation.

There it is.