AIX OS: /var is full

Posted on 2006-04-19
Last Modified: 2013-11-17
Dear Gurus,

I am new to IBM AIX boxes.

Today when i checked the disk utilisation, it showed me that /var is 100% full.

I would like to delete few old log files.

when i investigated further, I came to know that /var/adm is occupying a lot of space

Could some one help me out which files I can delete safely.

Thanks in advance


Question by:sugunakar
    LVL 61

    Expert Comment

    The problem is that you deleted "some old log files" and they still take space while processes do not close tham.

    # kill -HUP `cat /var/run/`
    LVL 6

    Accepted Solution

    What's the size of your /var partition.

    Normally it should be 1 to 2 GB but if you have a fairly active servers with several users then you may increse the size of the /var partition.

    See if the wtmp file in /var/adm is taking huge space. System reboot solves the problem in /var cleanup or you can do:
    cp /dev/null /path/to/wtmp
    Also you can do: errclear 0 to clear all the error logs till date.

    Also you can use freeware utilities such as tidysys ( and logrotate ( for regular system cleanups.

    LVL 61

    Expert Comment

    > cp /dev/null /path/to/wtmp

    : > wtmp
    LVL 3

    Author Comment

    thanks to all whio responded to this query.

    The next day when i checked /var got cleared , i did nothing.

    Now it is safe.


    LVL 61

    Expert Comment

    Some process reopened file because of cron or diag....

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. Please see for the updated article. It is avail…
    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now