Subject: Re: Let "locate" search/index network volumes, too?
To: Frederick Bruckman <fredb@immanent.net>
From: Robert Elz <kre@munnari.OZ.AU>
List: tech-userlevel
Date: 02/03/2004 18:09:55
Date: Mon, 2 Feb 2004 10:29:16 -0600 (CST)
From: Frederick Bruckman <fredb@immanent.net>
Message-ID: <Pine.NEB.4.58.0402021000210.204@seduction.immanent.net>
| Actually, "mktemp" puts them in "/tmp", by default, so you must be
| changing it already.
No, I was assuming it was /var/tmp (which is what I remembered sort
using from the distant past, as /tmp is (was) almost never big enough).
No wonder my locate.database is always 0 size! My /tmp is only a few 10's
of MB's (mfs), my file list probably runs to GB's (lots of small files,
many of them visible via unionfs in many different places in the tree...)
| Doesn't it work to simply set TMPDIR at the top of root's crontab?
It would, but that would affect everything in root's crontab, and that's
not what I want to do. I could probably change the /etc/weekly line to
TMPDIR=/big/empty/place sh /etc/weekly
but even that runs everything in /etc/weekly with the bit tmp dir,
which is also not really what I'd prefer (though probably wouldn't do
any noticeable harm, given how little, other than updatedb, weekly
actually does usually...)
| I thought "-" did the usual thing, and "+" does the opposite, as for
| example, in the shell, "set -x" turns on debugging, and "set +x" turns
| it off.
I always treat that set usage as an understandable weird case.
That is, the '-' there isn't an "on" flag, it is a "what follows
is an option" flag. Given that, "set -x" is "set the option that is 'x')
then having that mean "turn on" becomes obvious.
In early shells, the way to turn off such an option, once it was
on, wasn't "set +x" it was "set -" (that is, any option not set
would be disabled). It rarely made sense to turn on more than one,
though if you weren't sure, the method was
set -`echo "$-" | tr -d x`
(which is also why, in the pre "--" days, scripts that wanted to really
work, and use the "set" command to set args, used to do "set -$- x y z",
otherwise if the first char of 'x' was '-' bad things happened)
When someone decided that a way to explicitly disable an option was
needed, I assume they looked at 'set -x' and said, if that turns 'x'
on, then the obvious way to turn it off should be "set +x" as that's
clearly the opposite, though it completely breaks normal option
processing (set -X would have been better, if very weird, or set -!x
or something...)
| That used to seem backwards to me, too, but I've now embraced
| the idea. I could go either way on this -- what do other folks think?
Apparently, they don't!
But, now I have seen ITOH Yasufumi's variant of much the same idea, I
have to say, I prefer that one - it is more easily expandable, and
what's more, already provides a TMPDIR setting option!
kre