Operating System - HP-UX
1829101 Members
2548 Online
109986 Solutions
New Discussion

Removing files from time to time.

 
SOLVED
Go to solution
Alessia Gigliofiorito
Occasional Contributor

Removing files from time to time.

Hi all,

I know that there are files ?unbounded?, that is they become large and from time to time you need to delete the content of this files. A good SA, during is working day, what files has to check?
And about Core files? I?d like to know names of this files and dimensions (so after you have to delete them).

Regards, Angelo.
I will work harder, HP-UX is always right.
4 REPLIES 4
Alexander M. Ermes
Honored Contributor
Solution

Re: Removing files from time to time.

Hi there.
You can use SAM.
Menu :
--> Routine Tasks --> System log files

Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Stefan Farrelly
Honored Contributor

Re: Removing files from time to time.


Some files which can grow very large which you may need to check regularly are;

/var/adm/syslog/syslog.log
/var/adm/syslog/mail.log
/var/adm/wtmp
/var/adm/cron/log
/var/adm/lp/log
Also some directories for temporary files;
/var/tmp
/tmp
/var/spool/mqueue (for undelivered mail)

As for core files, these can be as large as a process is in memory. So if you have user application processes which can grow to 50MB (for example) then you can have core files of 50MB. These could cause a space problem, so what we do is create a symbolic link in users home directories called core which points to /dev/null, this way no core files are created which can take up lots of diskspace and we then need to search for and remove. Only if you must keep the corefiles to investigate why they dumped then dont do this.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Rita C Workman
Honored Contributor

Re: Removing files from time to time.

Since many software packages maintain logs try doing a find and tracking these down so you can trim them.

find / -name *.log -print
find / -name log* -print
find / -name *log* -print

Will bring up alot you may not want, but if you don't know the filename specifics on how an app may store it's logs..you may have need to try any or all of the above to find them.

Just a thought,
Rita
someone_4
Honored Contributor

Re: Removing files from time to time.

Hi here is a script that I use in cron that actully clears out files and will compress files on a daily basis.

Richard