|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: mktemp() and friends
Benedikt Stockebrand (benedikt
devnull.ruhr.de)Tue, 24 Dec 1996 02:34:45 +0100
- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Theo de Raadt: "Re: mktemp() and friends"
- Previous message: Steve \: "Re: mktemp() and friends"
- In reply to: Darren Reed: "Re: mktemp() and friends"
- Next in thread: Theo de Raadt: "Re: mktemp() and friends"
Darren Reed <avaloncoombs.anu.edu.au> writes: > Then there are temporary files used in shell scripts - quite often root > cornjobs get implemented to write to some file in /tmp A more reasonable approach would be to use $UID and/or $$ and/or $RANDOM and/or `date +%s` (if you've got a GNU date) in the file name. Like /tmp/cron.daily.`date +%s`.$$ --- one of my favourites. > (I prefer to use /, ~root or /etc). While it is acceptable to put temporary stuff in ~, /tmp has the advantage that it may be cleaned up after a reboot. And consider both / and /etc potentially both small and mounted R/O. So if you want to stay portable, stick with /tmp. Finally, what if you're using an NFS-mounted ~ and run the same stuff on multiple machines --- ok, that's usually not a problem with ~root, but you can't generalize this approach. Ben -- Ben(edikt)? Stockebrand Runaway ping.de Admin---Never Ever Trust Old Friends My name and email address are not to be added to any list used for advertising purposes. Any sender of unsolicited advertisement e-mail to this address im- plicitly agrees to pay a DM 500 fee to the recipient for proofreading services.
- Next message: Theo de Raadt: "Re: mktemp() and friends"
- Previous message: Steve \: "Re: mktemp() and friends"
- In reply to: Darren Reed: "Re: mktemp() and friends"
- Next in thread: Theo de Raadt: "Re: mktemp() and friends"