\tmp Directory is full up to 99%.

Dear All,

We are on AIX OS, /tmp directory is filled up to 99% percent,
Please suggest, How to get free space for "/tmp"?
which files can be deleted from /tmp? and How to delete it? is there any commands.....

Thanks in advance,
Its very urgent, Helpful answers will be appreciated,
Please suggest,

Regards
Vamsi.

It would be easier and safe to increase /tmp file system size than deleting,
for example.

# chfs -a size=10000 /tmp 

If there is no skip you can delete the files which are not accessed by a process.
by issuing the following commands.
Identifies processes using a file or file system

$ fuser -u /dev/hd3

Displays dates of access for a file , to see old files that hasn't been accessed for while .

$istat /tmp/somefile

Then you can remove old files

$ rm -f /tmp/somefile

istat myfile (Displays attributes about the file named myfile)

Thanks for your post.

Per definition everything in "/tmp" can be deleted. If it mustn't be deleted it should be put elsewhere in first place. That said, users should be assured that there files are not removed immediately (this would render this filespace useless in fact), but everything older than 48 or even 24 hours is fair game.

I hope this helps.

bakunin

Dear bakunin,

I am moving all the files from /tmp to another folder, i hope it helps me,

Please give me some clarity on this, there are many many files with different extensions like ".tmp, .log, .txt............. in /tmp folder.

If i want to delete these files from /tmp, can i...........

Thanks in advance.

you should probably not delete .log files - if you want to make space empty them up but leave them where they are - just in case an application still uses them. If you delete logfiles still in use, than the application might crash or some other weird behaviours might occur, so better >file.log

As previous posters mentioned already, you can as well check for last access with 'find /tmp -atime' whatever timeframe you want to keep just to make sure you dont remove files that might still be needed. Removing anything not accessed in the last 7 days might be a rather safe bet.

regards
zxmaus

1 Like

Hi there,

You delete the files that have not been accessed in 2 days or so easily by using the following command:

find /tmp/ -atime +1 -print0 | xargs -0 rm -f

/tmp directory could be used by many applications. You may try the below command to list down the files used by processes currently:

lsof | grep "/tmp"

The files that are not being accessed currently, you may safely remove them. Let us know if this helps.:slight_smile:

1 Like

Thanks admin_xor.