1833582 Members
3593 Online
110061 Solutions
New Discussion

/var/tmp

 
SOLVED
Go to solution
Carme Torca
Super Advisor

/var/tmp

Hi,

I would like to known if I could do an script to eliminated all the files that are not in use (doing an fuser), I want to executed it when /var will be full.

It's possible or maybe I can destroy some files that I cannot remove??

Thanks!
Carmen.
Users are not too bad ;-)
4 REPLIES 4
Victor BERRIDGE
Honored Contributor
Solution

Re: /var/tmp

Hi,
Yes you could remove unused files, but what is the size of /var/tmp? You created a separate filesystem ?
I would extend it if its giving you trouble...

All the best
Victor
MarkSyder
Honored Contributor

Re: /var/tmp

As it's a temporary directory you could set up a cron job to delete files over a week old:

find /var/tmp -mtime +7 -exec rm {} \;

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Mobeen_1
Esteemed Contributor

Re: /var/tmp

Carmen,
I would go with Mark's suggestion of setting up a cronjob that will do this for you.

As he indicated, select a criteria like 7 days or 15 days, what ever suits the best to your environment and run it once that many days.

regards
Mobeen
Geoff Wild
Honored Contributor

Re: /var/tmp

/var/tmp - be careful - some apps may be placing files there - that may not be open but are needed by the application to see every now and then...IE - they won't show in fuser every time you run it. For example, maybe a lock file.

On my servers, /var/tmp is quite small anyways - 8 to 24 MB or so...

If using perfiew, make the following a separate filesystem:

/var/opt/perf/datafiles

Also, make /var/adm/crash one as well...

I find /var/adm/sw/save the largest - if you can't extend /var, you can always run a cleanup on your installed patches:

cleanup -c 2


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.