Favourite commands

(Steve Jalim) #1

This is a bit of a strange one, but I just realised that I feel genuine pleasure or excitement when invoking certain commands - and am confident enough to know that I won’t be alone in this.

The one which triggered the brain tingle just now is, simply

$ redis-cli

… which I think is pretty bound to how much I like Redis’s clean feel, speed and nice API.

Ladies and gentlemen, don’t leave a geek hanging. What’s your secret CLI pleasure?

(Marc Cooper) #2
λ iex -S mix

Starts the elixir repl for a phoenix project :dancers:

That usually means I’m playing with fun stuff.

redis-cli is so important I have it aliased to rc :sunglasses:

(Jon) #3

One I discovered from last night, totally thrilled to get a free and proper SSL certificate installed on my server with one command:

./certbot-auto \
        certonly \
        --webroot \
        -w /var/sites/myproject/app/web/ \
        -d myproject.example.com

This is, of course, a Let’s Encrypt client, and there’s even a cron module to auto-renew every 30 days. Magic!

(Marc Cooper) #4

I’ll raise you on Let’s Encrypt:

λ ./letsencrypt-auto renew

The first time I ran that I almost cried. I renewed three domains in a few seconds.

I get to run it again next week on even more domains. Can’t wait! :beers:

(Richard Cunningham) #5

lsblk -s

Which gives you tree of the layers of your disks through LVM, RAID and the partitions/disk underneath.

strace and tcpdump

I don’t know how I’d fix anything without those two.

git commit -a

Because that means I’ve finished the change/fix :slight_smile:

(Daniel Hollands) #6

I was tempted to do a:


but didn’t, for fear that someone would run it on their machine and delete their hard drive. The people who know the command know not to do it. I did it on my machine when I left Intercity, poor thing.

(Marc Cooper) #7

Gives you the same feeling as the urge to jump when standing on the edge of a cliff.

(Jon) #8

Sounds alarming - thankfully not installed or available in Ubuntu! :fearful:

(Matt Machell) #9
sudo !!

for those moments where you typed something, hit enter, but forgot it required root.

(Andy Wootton) #10

Not exactly but I worked on VMS where commands could be abbreviated until unique, but always to 4 letters. I’ve been taking some pleasure on the Ubuntu HUD in finding commands that are unique in 4. fire(fox) is the one that springs to mind. It fires up my browser.

I’ve moved to Gnome Desktop. Is that still the HUD? [Windows key]fire

(Daniel Hollands) #11

You’ve just reminded me of my actual favourite command:


This is provided by The Fuck, a:

Magnificent app which corrects your previous console command

Recommended for all.

(Greg Robson) #12

git commit -p

Interactive patch - choose which “hunks” of files are added into a commit - very useful when you have a mixture of changes (e.g. functional and coding standard). Commit all the functional changes in one commit, then the remaining coding standard changes in the second. One commit = One action :smile:

(Richard Wallman) #13



(Andy Wootton) #14

Anyone can get in. Getting back out is the hard part.

I’ve never taken part in the editor wars because I thought vi and emacs were equally impenetrable but I recently saw for the first time that they aren’t comparable. You make your choice based on whether you think your environment is Unix or Lisp.

(Greg Robson) #15

I’m proficient in Sublime (rarely use the mouse), however I do recognise that after seeing some YouTube videos that there is a “next level” of proficiency. e.g. Don’t use the arrow keys: switch mode and use H/J/K/L to navigate the text editor - this saves you the effort of even moving your hand.

Where possible I have tried to use similar steps in Sublime Text - such as EasyMotion (bound to CTRL+;) https://packagecontrol.io/packages/EasyMotion for jumping around the editor.

Largely I can’t be bothered to rebuild all my habits - although who knows. At some point I would like to get a Macbook and get one of those small keyboards, that might force me to rethink?