What is the official way to create unique filenames in Unix?

What is the official way to create unique filenames in Unix?

Post by dengel.. » Tue, 22 Feb 2000 04:00:00



Gentlemen,

I need to create a unique file for each Fax I send from BaanERP. The
output in baan can be rewritten to a unix file in a certain directory
that is actually a shared NT directory. (using WRQ NFS Gateway) How can
I make absolutely sure that each time a Fax is exported from BaanERP a
new file is created?

Ive found the following solutions but Im wondering whats the
official, bullet-proof way in my situation?

- man mktemp, man mkstemp .
- touch /tmp/file.`date "+%s"'
- mkdir --mode=700 /tmp/foo.$$
- TEMPFILE=/tmp/name-$$
- TEMPFILE=/tmp/name-$HOSTNAME-$$
- FILE=/tmp/abc.$RANDOM

Thanks in advance,
Ditmar

Sent via Deja.com http://www.deja.com/
Before you buy.