Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ns_tmpnam(3aolserv) [debian man page]

ns_tmp(3aolserver)					    AOLserver Built-In Commands 					ns_tmp(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_mktemp, ns_tmpnam - commands SYNOPSIS
ns_mktemp template ns_tmpnam _________________________________________________________________ DESCRIPTION
ns_mktemp returns a unique filename based on the template you specify. ns_tmpnam returns a filename that can safely be used for a tempo- rary file. The template for ns_mktemp should contain a string with six trailing Xs, which will be replaced with an alpha-numeric string of six charac- ters chosen to make the filename unique. If template does not end with six trailing Xs the empty string will be returned. ns_tmpnam calls the tmpnam() C library function, and the results will depend on your operating system. On Irix, for example, tmpnam() always generate a file name using the path-prefix defined as P_tmpdir in the header file which is "/var/tmp/". EXAMPLES
nscp> ns_tmpnam ;# On Linux /tmp/filevuLwaE nscp> ns_mktemp /tmp/foobar.XXXXXX /tmp/foobar.p6SlaC SEE ALSO
nsd(1), mktemp(3), tmpnam(3) KEYWORDS
AOLserver 4.0 ns_tmp(3aolserver)

Check Out this Related Man Page

ns_rand(3aolserver)					    AOLserver Built-In Commands 				       ns_rand(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_rand - commands SYNOPSIS
ns_rand ?max? _________________________________________________________________ DESCRIPTION
ns_rand generates a cryptographically-secure random number. If max is not specified, the random number is a floating-point value n such that 0.0 <= n < 1.0. If max is specified, it must be a positive integer between 0 and 2147483647. The return value is an integer value such that 0 <= n <= (max - 1). Internally ns_rand is implemented with the drand48(3) and lrand48(3) standard library functions. An internal random seed is generated the first time ns_rand is called after the server starts. EXAMPLES
nscp> ns_rand 0.39938485692 nscp> ns_rand 10 7 SEE ALSO
nsd(1), info(n), drand48(3), lrand48(3) KEYWORDS
AOLserver 4.0 ns_rand(3aolserver)
Man Page