When 100% disk usage, find large files or folder on Linux:

find / -xdev -size 1000000 -ls

Delete that folder:

mkdir empty_dir
rsync -a --delete empty_dir/ yourlargedirectory/

If you want to delete old file >1 day:

find /yourlargedirectory/ -mtime +1 -type f -delete

In my case, I set cronjob for delete all old file in a session folder:

0  0  *  *  * root  find /var/lib/lsphp/session/lsphp80/ -mtime +1 -type f -delete


Leave a Reply

Your email address will not be published. Required fields are marked *