Monitor Folder Size
Is There a Way to Monitor and Log Folder Size in Bash/Ubuntu? I'm Running Some Computations and I Need to Know How Much Disk Space They Need. They May Create...
Is there a way to monitor and log folder size in Bash/Ubuntu? I'm running some computations and I need to know how much disk space they need. They may create some temporary folders for a few minutes/hours.
In fact, I need only a peak size of this folder.
2 Answers
you might try something like:
watch "du -skh /your-directory"
If size/number of file increases set interval with "-n" to much greater than 2 sec
Best,
Bodo
watch is not created to produce log-files.
What you search is something like:
#!/bin/bash
while :
do
du -skh /your-directory
echo "Press [CTRL+C] to stop.."
sleep 1
done