mktemp(1) in /tmp or $PWD?

jhell jhell at DataIX.net
Sat Feb 27 02:57:47 UTC 2010


On Fri, 26 Feb 2010 05:56, yanefbsd@ wrote:
> On Fri, Feb 26, 2010 at 2:29 AM, Jonathan McKeown <j.mckeown at ru.ac.za> wrote:
>> On Friday 26 February 2010 12:03:42 Garrett Cooper wrote:
>>> FreeBSD is a great system; if there are ways that I can possibly make
>>> it better by adding smart defaults
>>
>> Be careful about that value judgement. There are certainly ways you can change
>> it. Not everyone might feel the change is for the better, and changing the
>> default behaviour of widely-used commands is one change that you might find
>> some people disagree with.
>
> I agree that there are some things that I'm going to have to apply on
> my own personal machines to achieve behavior that I want, and I agree
> that my way may not be the best way to do things, but that's part of
> the reasoning why I'm asking whether or not others find some value in
> what I'm proposing...
>
> Thanks,
> -Garrett
>

Hi Garrett,

First off don't get me wrong and I understand where your coming from on 
this but.  GNU/Linux utilities have assumed the lazy system administrators 
approach for a long time, let me explain.  By specifying defaults as said 
$PWD to find(1) you are now assuming that the user does not want to see 
any usage info and now has to type -h or maybe --help or possibly -? "This 
is Wrong".  Now on the case for mktemp(1) always specifying a /tmp as a 
default is making the lazy assumption that /tmp will always be usable yes 
this is BSD, Linux, UNIX but any utility that is going to write and not 
have a specified path should always write to $CWD and if $CWD is not 
writable then its a programming mistake.  I like knowing that when I issue 
a command whether it be from a script or from the prompt that I do not 
have to look elsewhere unless that is what I wanted.

Regards,

-- 

  jhell



More information about the freebsd-hackers mailing list