Pádraig Brady wrote: > On 06/01/2012 02:13 PM, Jim Meyering wrote: >> Pádraig Brady wrote: >>> It seems like we should default to /var/tmp in sort(1) and tac(1), >>> as debian and fedora at least are probably moving to tmpfs for /tmp. >>> I'll monitor the situation a bit before making the change. >> >> Thanks. >> >> Just to be clear, sort would continue to honor $TMPDIR, and >> your suggested change would affect only those rare uses of sort >> for which $TMPDIR is not already set? > > TMPDIR is not normally set in my experience. > It can be set to override the default.
Oh, you're right: unset TMPDIR is probably not rare at all. I've been setting it myself for so long... > If it was normally set to point to tmpfs, > then we couldn't really use it, but I > don't think this is the case. > >> i.e., in sort.c, >> >> -# define DEFAULT_TMPDIR "/tmp" >> +# define DEFAULT_TMPDIR "/var/tmp" > > Right. Good. That should be fine. Anyone who is using sort on very large data sets must already deal with disk space via manually-set TMPDIR or an explicit -T option. However, I'm sure some people have /tmp deliberately large (and much larger than /var/tmp) for precisely this use case, and would not be pleased. But if those same people upgrade to Fedora 18 they will adapt (simple, manual config) so that /tmp remains disk-backed with whatever size they require.
