snipt

Ctrl+h for KB shortcuts

Bash

monitor space usage in real time - by partition and with total

watch 'df -P / /var /mnt/* | tail -n +2 | ( total=0; while read dev blocks used rest; do total=$(($total+$used)) ; echo $used $dev; done; echo -----; echo $total )'
https://snipt.net/embed/92caf508218f539ff6f88c9340ce1e0f/
/raw/92caf508218f539ff6f88c9340ce1e0f/
92caf508218f539ff6f88c9340ce1e0f
bash
Bash
1
2019-08-20T11:12:32
True
False
False
/api/public/snipt/5160/
monitor-space-usage-in-real-time-by-partition-and-with-total
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>watch <span class="s1">&#39;df -P / /var /mnt/* | tail -n +2 | ( total=0; while read dev blocks used rest; do total=$(($total+$used)) ; echo $used $dev; done; echo -----; echo $total )&#39;</span> </span></pre></div> </td></tr></table>
bash, df, disk, monitor, partition, space