Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What directories I should look to delete log files?

Status
Not open for further replies.

isonlyme

Programmer
Apr 20, 2002
171
PR
Hi pros

I know theres a lot of log files on my hp-ux 10.20 that i should delete cause of disk space problems but is the a list of directories where log are located so i can delete them? I saw a document of a thread that has it but i cant find it...

any help will be very very appreciated...


thanks
 
If you know the file extension of the logs, you can (from / ):

find . -name '*.log'

where *.log should be replaced by whatever your filename format is. This will provide a list of files and their locations and you can prune as required, possibly using find with the -mtime option to delete files older than a particular age. If you know that you're having space problems in one particular filesystem, cd to that filesystem before doing your find to make it quicker. Does this help?
 
isonlyme,

I'm in agreement with Ken on identifying the file system that is having space problems and working from there. I'm not aware if there is a specific list of logs that should be removed but I can advise, based on your /var space allocation, to do cleanup in that area.

Do a man on the 'cleanup' utility (/usr/sbin/cleanup). This utility will help to reclaim space in /var by cleaing up the SD logfiles and removing superceded patches. I haven't used 10.20 in quite a few years but I do recall there being a -F (force) option that is not an option in the 11.11 version of HP-UX, at least I don't see it on the man page. Be careful with the -F option in 10.20 when reclaiming space in /var because you will not be able to back out patches if this option is used. Hope this helps as well.


~asante,<cag>
 
thanks both very much for the help!! now i have a starting point
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top