System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

script to delete full file system

 
kacou
Regular Advisor

script to delete full file system

i search a script which will permit me to delete a full file system (like /var when the % is 85 for exemple)

bests regards
4 REPLIES
Pete Randall
Outstanding Contributor

Re: script to delete full file system

rm -rf $1


Pete

Pete
Patrick Wallek
Honored Contributor

Re: script to delete full file system

I would never trust a script to clean up a file system is full. This is something that requires manual intervention.

**YOU** must look at the files in the file system and determine what can or cannot be deleted.

MarkSyder
Honored Contributor

Re: script to delete full file system

Are you sure you want to do this? I would sensible housekeeping on the /var filesystem rather than deleting files such as syslog.log and wtmp.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
James R. Ferguson
Acclaimed Contributor

Re: script to delete full file system

Hi:

Since you mention the '/var' filesystem, I'll mention how you can render your serve un-patchable!

Do _not_ manually manage the contents of '/var/adm/sw'. It is your IPD or Installed Product Database used by all the SD tools ('swinstall', 'swlist', etc).

To safely reclaim space in '/var' use:

# cleanup -c 1

...which will remove patches superseded at least once. This generally returns substantial space.

Regards!

...JRF...