Sponsored Content
Full Discussion: Temporary files and rm
Top Forums Shell Programming and Scripting Temporary files and rm Post 302237743 by gio001 on Thursday 18th of September 2008 09:16:07 AM
Old 09-18-2008
No mktemp ...

I do not seem to have mktemp on AIX.
 

7 More Discussions You Might Find Interesting

1. Ubuntu

Avoid creating temporary files on editing a file in Ubuntu

Hi, My ubuntu flavor always create temporary files having filename followed by ~ on editing. For eg: if I am editing a file called "sip.c", automatically a temporary (bkup) file is getting created with the name "sip.c~". How to avoid this file creation? (7 Replies)
Discussion started by: royalibrahim
7 Replies

2. Shell Programming and Scripting

Writing files without temporary files

Hey Guys, I was wondering if someone would give me a hand with an issue I'm having, let me explain the situation: I have a file that is constantly being written to and read from with updated lines: # cat activity.file activity1 activity2 activity3 activity4 activity5 This file... (2 Replies)
Discussion started by: bashshadow1979
2 Replies

3. Shell Programming and Scripting

Help - Bug: A script to compile two types of data files into two temporary files

Dear other forum members, I'm writing a script for my homework, but I'm scratching all over my head and still can't figure out what I did wrong. Please help me. I just started to learn about bash scripting, and I appreciate if anyone of you can point out my errors. I thank you in advance. ... (3 Replies)
Discussion started by: ilove2smoke
3 Replies

4. Shell Programming and Scripting

Rsync temporary files

Hi, I am looking to use rsync in a very specific way, and even though I have trawled the rsync man pages I have not succeeded in seeing a way of doing the following: The temporary files created by rsync should not be created in the destination directory. (I have used --temp-dir option to... (0 Replies)
Discussion started by: LostInTheWoods
0 Replies

5. UNIX for Advanced & Expert Users

Which time should be used for deleting temporary files?

I want to create a folder for users to put their temporary files and a folder for users to put their permanent files. For the temporary folder, I need to implement a deletion policy. I would like to know normally which time, ctime, mtime or atime, should be used to implement such deletion policy. (1 Reply)
Discussion started by: marctc
1 Replies

6. AIX

Hidden temporary files in AIX

Hi, Some porocess is creating hidden temporary files in /tmp directory. And they are not getting deleted. System is going out of disk space after some days. The temp files are getting created like .<user name><pid>. I have checked the application code, but didnt get any clue. Does these files... (4 Replies)
Discussion started by: viswath.sen
4 Replies

7. Homework & Coursework Questions

Help with exit, grep, temporary files, awk

1. The problem statement, all variables and given/known data: I do not understand how/why the following code is used. Please do not simply refer me to the man pages since I have already reviewed them extensively. Thank you. exit 2 , exit 3, exit 0 I understand the basics of why the exit... (5 Replies)
Discussion started by: BartleDoo
5 Replies
MKTEMP(3)						     Linux Programmer's Manual							 MKTEMP(3)

NAME
mktemp - make a unique temporary file name SYNOPSIS
#include <stdlib.h> char *mktemp(char *template); DESCRIPTION
The mktemp() function generates a unique temporary file name from template. The last six characters of template must be XXXXXX and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array. RETURN VALUE
The mktemp() function returns NULL on error (template did not end in XXXXXX) and template otherwise. If the call was successful, the last six bytes of template will have been modified in such a way that the resulting name is unique (does not exist already). If the call was unsuccessful, template is made an empty string. ERRORS
EINVAL The last six characters of template were not XXXXXX. CONFORMING TO
BSD 4.3. POSIX dictates tmpnam(3). NOTE
The prototype is in <unistd.h> for libc4, libc5, glibc1; glibc2 follows the Single Unix Specification and has the prototype in <stdlib.h>. BUGS
Never use mktemp(). Some implementations follow BSD 4.3 and replace XXXXXX by the current process id and a single letter, so that at most 26 different names can be returned. Since on the one hand the names are easy to guess, and on the other hand there is a race between test- ing whether the name exists and opening the file, every use of mktemp() is a security risk. The race is avoided by mkstemp(3). SEE ALSO
mkstemp(3), tempnam(3), tmpfile(3), tmpnam(3) GNU
1993-04-03 MKTEMP(3)
All times are GMT -4. The time now is 07:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy