mktemp can't create a file with a suffix/file extension
Bug #589408 reported by
Tomas Pospisek
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils (Debian) |
Fix Released
|
Unknown
|
|||
coreutils (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: coreutils
Package: coreuils
Version: 7.4-2ubuntu2
Release: 10.04
$ mktemp XXXXXXXXXXXXXXX
mktemp: too few X's in template `XXXXXXXXXXXXXX
WTF?!
$ mktemp tmp.XXXXXXXXXXX
mktemp: too few X's in template `tmp.XXXXXXXXXX
Say what again?
$ mktemp tmp.XXXXXXXXXXX
$
Allright, so mktemp seems to need a prefix.
That makes it quite useless for some task, like if you want to produces files of a specific "type", for today's luser-proof GUI Apps that won't list files that don't fit into their narrow horizon.
description: | updated |
Changed in coreutils (Debian): | |
status: | Unknown → Fix Released |
summary: |
- mktemp seems to need a prefixed template to work + mktemp can't create a file with a suffix/file extension |
To post a comment you must log in.
Thank you for opening this bug and helping make Ubuntu better. 'mktemp' does not need a prefixed template to work, 'mktemp whyXXXX' should work as well:
cerdea@xango2:~$ /bin/mktemp whyXXXX gnu.org/ licenses/ gpl.html>.
whyev0E
cerdea@xango2:~$ /bin/mktemp why.XXXX
why.A972
cerdea@xango2:~$ /bin/mktemp --version
mktemp (GNU coreutils) 7.4
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jim Meyering.
cerdea@xango2:~$
Now, on *newer* coreutils, you would also be able to use a '--suffix' parameter:
cerdea@xango2:~$ /usr/local/ bin/mktemp --suffix=.test whyXXXX bin/mktemp --version gnu.org/ licenses/ gpl.html>.
whySAE8.test
cerdea@xango2:~$ /usr/local/
mktemp (GNU coreutils) 8.5.51-c0cfa0
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jim Meyering and Eric Blake.
cerdea@xango2:~$
As such, closing INVALID (not a bug)