Making your day as a developer better

one (or two) command lines at a time

Basic shell

above ls, and cd, these commands will become invaluable.


essentially do that again…


go to the beginning of the command line

sudo !!

do that again with sudo


look at what you’ve done


rerun command 98 from your history


Everyones favourite version control, the backbone of everything.

Safe, worry free git pulls.

git fetch
git diff origin/master

then once you’ve seen whats coming down the wire

git pull

Sorting and piping and grepping and counting

I use this a surprisingly large amount of the time

sort | uniq -c | sort -n -k1 | head

to make sense of data.

lets say you’ve got a list of urls in urls.txt

cat urls.txt | sort | uniq -c | sort -n -k1 |head

gives you the top 10 most frequent urls in that file.

sort the list, then count uniques, sort numerically by the first col (where unique puts its count) then just take the top 10.

Like what you read? Give tim marsh a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.