Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Feb 2010 18:50:46 -0800
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        FreeBSD-Hackers <freebsd-hackers@freebsd.org>
Subject:   mktemp(1) in /tmp or $PWD?
Message-ID:  <7d6fde3d1002251850m3d32904emece0182e905b84c5@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi Hackers,
    Really basic question (because I'm relatively new to the Unix
scene -- only been using it for the last 10 years, so I don't know if
this was done for backwards compatibility with SysV) -- is mktemp(1)
without -t supposed to default to $PWD instead of /tmp if a template
is specified, e.g.

[root@left4dead /usr/home/garrcoop]# mktemp fooXXXXXX
foovE3FLt
[root@left4dead /usr/home/garrcoop]# ls foovE3FLt
foovE3FLt

    I ask because GNU coreutils' copy of mktemp (I know... I know...)
defaults to /tmp if $TMPDIR isn't specified.
Thanks!
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7d6fde3d1002251850m3d32904emece0182e905b84c5>