Hidden temporary files in AIX


 
Thread Tools Search this Thread
Operating Systems AIX Hidden temporary files in AIX
# 1  
Old 07-28-2011
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 are sytem created files??

Can any one have idea and help.

Regards,
Viswath
# 2  
Old 07-28-2011
We would like to hear more info , like what kind of process you are running ...., file /tmp/<filename> output and what happening when you give a rm on the file...
# 3  
Old 07-28-2011
Hi....Thanks for the reply

Hi,

sorry to say that I cant mention actual process names since it is confidential. Hope you will understand.

I am running some process XXXX, this process internally invokes some other process YYYY which is on demand process.

Now this on-demand process is creating temporary files in /tmp directory.The temp file name is like .<usrName><pidofOndemandProcess> (example: .root12456).

By using rm I am able to delete this temp file.

My doubt is do we have to remove these temp files with some cron entry only OR thie ondemand process which is creating these temp file only resposible to delete these files?? Generally in unix like platforms what would be the general way...? At least I couldn't find any clue from the code of this on demand process.

any help will be appreciated.

Thank you.

Regards,
Viswath
# 4  
Old 07-28-2011
Quote:
Originally Posted by viswath.sen
My doubt is do we have to remove these temp files with some cron entry
probably so, if you can't (?) configure your process to do so itself (at least so it seems).

Quote:
Originally Posted by viswath.sen
OR thie ondemand process which is creating these temp file only resposible to delete these files?? Generally in unix like platforms what would be the general way...?
Generally speaking it is good style to give back what you take. [RAMBLING MODE] This is fundamentally true: on a social level (but alas usually neglected - we call this phenomenon "greed") [/RAMBLING MODE] and it is equally true on the process level: If you, for instance, allocate memory and don't need it any more you give it back - programs failing to do so are called memory hogs" and are regarded as programmed sloppily. The same is true for disk space: if you create a temporary file you remove it once you don't need it any more, at the latest at process exit.

The best advice i can give you (apart from hanging your programmer with the head down for programming such crap) is to write a script which uses "lsof" "strace" or some similar tool to find out which files in "/tmp" are still in use by their processes and delete the others.

I hope this helps.

bakunin
# 5  
Old 08-01-2011
As rightly said before, the files might be used by your ondemand process, kindly use lsof command to find out the open files being used ...

Hope this hlps.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rsync - how to copy hidden folder or hidden files when using full path

Hello. I use this command : rsync -av --include=".*" --dry-run "$A_FULL_PATH_S" "$A_FULL_PATH_D"The data comes from the output of a find command. And no full source directories are in use, only some files. Source example... (2 Replies)
Discussion started by: jcdole
2 Replies

2. UNIX for Advanced & Expert Users

Find all files in the current directory excluding hidden files and directories

Find all files in the current directory only excluding hidden directories and files. For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided. `find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies

3. 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

4. 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

5. 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

6. 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

7. Shell Programming and Scripting

Temporary files and rm

Hello everyone, I am creating a temporary file in my ksh by using something file filetemp=filetemp.$$ Later on in my script I write to the file $filetemp by 'cat'ing to it. Then in the script I am doing a 'less' on the file to view it. At the end of the script I issue a rm $filetemp 2>... (4 Replies)
Discussion started by: gio001
4 Replies

8. Shell Programming and Scripting

Finding Hidden files and protecting the folder containing hidden files from deletion

Hi. I have a script which is deleting files with a particular extension and older than 45 days.The code is: find <path> -name "<filename_pattern>" -mtime +45 -exec rm {} \; But the problem is that some important files are also getting deleted.To prevent this I have decide to make a dummy... (4 Replies)
Discussion started by: pochaw
4 Replies
Login or Register to Ask a Question