Operating System - HP-UX
1832921 Members
2693 Online
110048 Solutions
New Discussion

Re: remove unnecessary directory and temp....

 
Ramana.Sv
Frequent Advisor

remove unnecessary directory and temp....

is it possible to remove unnecessary directories and temporary files removing...????
5 REPLIES 5
Oviwan
Honored Contributor

Re: remove unnecessary directory and temp....

of course it is possible.

$rm filename
$rmdir dirname

but be careful...
Steven E. Protter
Exalted Contributor

Re: remove unnecessary directory and temp....

Shalom Ramana,

Sure.

rm -rf *

Problem is you are not defining the problem.

Where are the temporary files?
Are they needed for the applicaiton to work?

As far as logging goes sam provides a log trimming facility.

You could right a script that uses find /dirname with the +mtime and at least get rid of stuff that has not been modifired recently.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fabian Briseño
Esteemed Contributor

Re: remove unnecessary directory and temp....

Hello Ramana.

define unnecessary directory and temp.


what directories and by temp I assume you mean temp files, what temp files ?


you have to be more specific.
Knowledge is power.
Fabian Briseño
Esteemed Contributor

Re: remove unnecessary directory and temp....

Hello Ramana.

Also remeber to assign points for any helpfull answers
Knowledge is power.
Yogeeraj_1
Honored Contributor

Re: remove unnecessary directory and temp....

hi Ramana,

You need to be cautious again.

Unnecessary directories should be defined as "user created directories" and temporary files should be defined as "files created by the application software and which are located in a specific directory".

If you intend to create custom scripts, you need to be careful of not deleting any system or application directories that could cause it to crash.

Otherwise, you can also configure your system so that all temp directories are automatically cleaned on restarts:
e.g.
/etc/rc.config.d/clean,
/etc/rc.config.d/clean_tmps
and
/etc/rc.config.d/clean_uucp

hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)