K shell /tmp/sh$$.* files problem

K shell /tmp/sh$$.* files problem

Post by A Kuma » Sun, 30 Oct 2005 07:08:20



Hi,

I am encountring this problem from some time now...

ksh creates temp files /tmp/sh$$.* .
Sometimes if some of my shell script crashes or I kill it... these temp
files remain in the /tmp directory.

At some later time when some script gets the same PID it tries to
create files in the /tmp directory, It fails complaining that

sh$$.* : cannot create

Its a multi user unix system... so shell script may not overwrite files
created by other user.

Does any one have a solution to this problem....?

I dun want to do something like checking and deleting stray temp files
once in a while...

May be each user can have a separate TEMP directory...

Thanks

 
 
 

1. KSH /tmp/sh$$.* files problem

Hi,

I am encountring this problem from some time now...

ksh creates temp files /tmp/sh$$.* .
Sometimes if some of my shell script crashes or I kill it... these temp
files remain in the /tmp directory.

At some later time when some script gets the same PID it tries to
create files in the /tmp directory, It fails complaining that

sh$$.* : cannot create

Its a multi user unix system... so shell script may not overwrite files
created by other user.

Does any one have a solution to this problem....?

I dun want to do something like checking and deleting stray temp files
once in a while...

May be some environment variables I can set to customize the names of
these temp files...

Thanks

2. Xfree-Symptom: distorted mouse pointer

3. Spurious sh* files in /tmp

4. package scripts

5. What are the "/tmp/sh*" files for?

6. Q: P6 and dual P6 for Linux?

7. Spurious sh* files in /tmp

8. Boot-up kernel configuration

9. Is "sh file" equivalent to "cat file | sh"

10. /tmp vs /usr/tmp vs /var/tmp

11. find /tmp -atime +1 | rm does not delete my old tmp files :-(

12. root's shell, /sbin/sh, /bin/sh and /usr/ksh

13. NEWBIE-Shell scripting - When to use script variable vs. create tmp file???