Three hacks and commands to use in your terminal.
Anton
Posted on November 1, 2018
The first one is:
du -sh */ | sort -rh | head -6
This command will show 6 heaviest folders.
du - disk usage
| - pipe. Which works like pipes in Elixir and Elm.
Basically, the output of the first function becomes an input for the next function and so on.
head - shows only a certain amount of output.
The second one:
Turn this >
into this >
Just add this to your ~/.bashrc:
PS1='\$ '
After that you need to restart your bash:
source ~/.bashrc
Also, there are different ways to restart your bash.
There are more ways you can set this up check out this overflow to find out more.
The third one:
Creating folders with a pattern. Recently I had to create 8 folders for my codewars challenges:
mkdir kyu_{1..8}
I unfortunately don't remember where I find out about this command.
Oh, I just found it. It's here.
Posted on November 1, 2018
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.