A good command line to start with:
du -kx /var | sort -rn | more
It will list the amount of space contained by each directory, sorted by size in decreasing order. Of course /var
itself will be at the top since it contains everything else, but with this list you can easily identify the longest branches of the directory tree that contain the largest amount of data. Those are good candidates for finding the largest things that need to be cleaned up.
Note that HP-UX has system logs under /var/adm/syslog/
and the default configuration does not necessarily include any form of log rotation, so the log files may have grown huge. But these are text files that can be freely truncated to zero size if you wish.
You should not remove any active logfiles as syslogd
won't automatically create new files if an expected log file is missing, but truncating them to zero size with e.g.
> /var/adm/syslog/syslog.log
is fine to do.
The sam
menu-based administration tool has a function for automatically truncating the /var/adm/wtmp*
files (the history of previous logins) in a way that saves the most recent few weeks of history, I think. These files use a binary format that is not easy to edit manually, but if you don't care about maintaining information on previous logins, truncating them to zero size is a valid option too.
/var
a separate partition to/
? – ctrl-alt-delor May 04 '20 at 21:28du
is standard. But is not graphical (this is a good best suited to a GUI). Give it a go, it is not too bad. You can get a pretty good idea from the numbers. And you don't need to install to run a program. – ctrl-alt-delor May 04 '20 at 21:40du
it is good option. How can I order the output ofdu -k /var
based on size? With the most size at the end. – jet2016 May 04 '20 at 22:05