Making your day as a developer better
one (or two) command lines at a time
above ls, and cd, these commands will become invaluable.
essentially do that again…
go to the beginning of the command line
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 diff origin/master
then once you’ve seen whats coming down the wire
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.