Hi dear,
i want to create a script that will automatically detect my /var size of linux partition in redhat and then it should automatically stop service and should remove all the files in squid cache. i don't know how to check that partition is filled or not??? can any one help me

Scenarion of Script
1>Check that /var is fill or not??
2> if (yes)
{Remove squid cache files}
{should check again}

Muhammad Asif