What are your UNIX pipeline commands that saved you from lot of coding/time?
István Lantos Oct 27 '17
This question came to my mind last day when I wanted to free up some space on my HDDs and when it comes to what to delete (feel the pain), I wanted to know without lot of right-clicks which folders are the fattiest. As a good Windows user, I installed Total Commander, because some random Google result told me to do so.
Then I realised, heck, I have an entire UNIX environment on my PC (MSYS2), so maybe there is an utterly simple one liner command for achieve this. And guess what, it has: :)
$ du -sh * | sort -h
Life hack, place this in your
# Within the current directory, list all folders and files # and print their size, then sort it from smallest to largest: alias du='du -sh * | sort -h'
What are your UNIX pipeline commands, where you can combine some program's standard output and creating something wicked simple time saver?