How to delete files quicker than rm -rf?

Posted by Byakugan on Server Fault See other posts from Server Fault or by Byakugan
Published on 2012-11-15T03:18:15Z Indexed on 2012/11/15 5:00 UTC
Read the original article Hit count: 224

Filed under:
|
|
|
|

Is there any way how to delete folder/files quicker than with command rm -rf?

It seems my disc is filled with bilions of files (sessions of php5) which were not deleted in cron so I need to delete them manually but it takes hours and it is still not helping reducing the amount. Thank you.

My command: rm -rf /var/lib/php5/*

Tried also these commands:

find /var/lib/php5 -name "sess_*" -exec rm {} \;

And

perl -e 'chdir "/var/lib/php5/" or die; opendir D, "."; while ($n = readdir D) { unlink $n }'

© Server Fault or respective owner

Related posts about linux

Related posts about php