Bash-oneliner: A collection of handy Bash one-liners and terminal tricks
A really nice list, thanks a lot for sharing! :)<p>I'd add this when a filesystem gets almost full (but not overfilled, see below). This shows where most of the space goes:<p><pre><code>  # du -axm / | sort -n | tail # takes a while on large filesystems, or ones with lots of files
</code></pre>
Then narrow down for each of the most filled directories:<p><pre><code>  # du -axm /some/dir | sort -n | tail # subsequent searches are fast, now that metadata is cached.
</code></pre>
In case there is no space at all, <i>sort</i> will complain if the /tmp directory is on the same fs, then the only option is to search any suspect directories with du -sm $dir<p>And about this one: <a href="https://github.com/onceupon/Bash-Oneliner#using-ctrl-keys" rel="nofollow">https://github.com/onceupon/Bash-Oneliner#using-ctrl-keys</a><p>A bit surprised that the Ctrl+b(ack one...) and Ctrl+f(orward one char) shortcuts are not included.<p>As well as their Alt+b/f for a word back/forward too. Very convenient for going through a long command by getting in the beginning or the end of the line, then move words back/forth to update it.