Temporary files and directory notes

From Helpful
Jump to navigation Jump to search
This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

libc

http://www.gnu.org/software/libc/manual/html_node/Temporary-Files.html


shell

mktemp

Note that on success it prints out what it makes, you can do things like:

export MYTEMPDIR=`mktemp -d /tmp/my.XXXXXXXXXX` 

Note that you program will still need to check whether the variable contains anything, and whether that dir is writeable.