Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Folder size linux

I need to monitor folders on my linux machine periodically to check whether they are exceeding certain limits.

I have checked stat function call but running stat recursively on all sub folders and files is time consuming and I need to do this for all folders.

Does kernal maintain any datastructures which I can interpret in my program.Or is their any standard api for this.

like image 613
Sirish Avatar asked Sep 20 '26 12:09

Sirish


1 Answers

If you need to enforce limits then use quotas

like image 110
Axel Gneiting Avatar answered Sep 22 '26 01:09

Axel Gneiting