hello people
i need your help please
i want to achieve the following with the simplest, most efficient shell-tools:
i have a directory with a lot of files from users.
the script should check which partition the dir is on
if the partition with the directory is more than 90% full
sort files in the directory by date last touched
then delete the 50 oldest files
i have done this in PHP but it is pretty slow now by growing number of files on a 2TB drive.
and in Shell-scripting i am not good at all to achieve this
id be very happy if one of the professionals here could help me.
if you want i write you a little funny poem as a thank you
peace, Tony