Re: tmp issues: trap before making safe tmp and no change directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Would it be possible to write a small compiled program
> that could do the "atomically create unique
> file/directory and return it's name" program?

Yes, it's called 'mktemp'

	TMPFILE=`mktemp -t example.XXXXXXXXXX` || exit 1
	echo "blah blah blah" >> $TMPFILE



--
Brian Hatch                  "Zathras listens, he does,
   Systems and                yes. Zathras listens and
   Security Engineer          does what he's told."
http://www.ifokr.org/bri/

Every message PGP signed

Attachment: pgp00008.pgp
Description: PGP signature


[Index of Archives]     [Fedora Announce]     [Linux Crypto]     [Kernel]     [Netfilter]     [Bugtraq]     [USB]     [Fedora Security]

  Powered by Linux