Unix provides a couple of useful commands to create temporary file names or directories that can be used in your applications or shell scripts.
In Linux we have mktemp and tempfile. The simplest usage is as follows:
mktemp
/tmp/tmp.avSbCw
or…
tempfile
/tmp/file8W2jIZ
For more information take a look at man pages for both commands.