Record Size of each directory
I am trying to write a script that would record the size of each of my user directories and record the output to a file to eventually be used with gnuplot. What is the easiest way to get the size of each subdirectory? For instance, I only want the total size of each individual user's directory under /home. Is there anything easier than:
(not real code, but you get the idea) for DIR in /home/* SIZE='du -ks $DIR' Is a bash script the way to go? Should I use a different language? |
du is probably the best for this. There are ways of doing it on other languages, but it basically comes down to the same thing really.
|
Thanks, that's what I figured.
|
All times are GMT -5. The time now is 05:35 PM. |