Don't start your command name with the letter g.
June 16, 2020 8:25 AM   Subscribe

 
Imagine if Slack called itself webirc.

Well, nothing's stopping us
posted by Sockdown at 8:30 AM on June 16 [4 favorites]


Why someone would make a joke about Stallman being a control freak in this day and age mystifies me. Tasteless doesn't begin to describe it.
posted by NoxAeternum at 8:38 AM on June 16 [1 favorite]


For those unfamiliar, here are some common command line tools and their functions:

curl - Set an exercise reminder. Less common now with the advent of standing desks

awk - Send a message to a user that makes them feel uncomfortable

cat - Set your alert sound.

mkdir - Displays a dirty joke. Deprecated.

vim - Launches emacs *ducks*
posted by gwint at 8:39 AM on June 16 [32 favorites]


A recent name I like is dust. It's like du, but written in Rust, and it helps you clean up your files, like dusting your bookshelf.
posted by theodolite at 8:41 AM on June 16 [5 favorites]


cd - Opens cup holder.
posted by swift at 8:42 AM on June 16 [18 favorites]


Thanks for introducing me to dust; that's a really cool tool.

There's another whole class of CLI names: tools that only need to be run once or occasionally. In those cases, pithiness is the overriding consideration, which is why when I wrote a script last week to migrate github repos to arbitrarily-named default branches I was at least partially motivated by the opportunity to name it no_masters.sh.
posted by phooky at 8:54 AM on June 16 [8 favorites]


He seems to be a Pythonista (also nitpick that gunicorn violates his Stallman rule) but I guess he’s lucky enough not to have spent time with conda because wow, if you care about nice CLI behavior that’s just a whole barrel of badness.

(The newer versions actually have improved a lot, but when your baseline involves overloading the source command there’s sort of nowhere to go but up.)
posted by bjrubble at 8:54 AM on June 16 [1 favorite]


Nothing beats the pure, Vogon-esque poetry of:

cat ./somefile.txt | grep keyphrase | awk '{print $1}'|grep -v unwantedphrase

More on-topic, there are some great Power Words available to the intrepid shell explorer... My favorite is kill, but sleep is pretty awesome, too.
posted by godspeed.You!Black.Emperor.Penguin at 9:09 AM on June 16 [1 favorite]


And let's hear for which. Which python am I using? Better type which python and find out!
posted by theodolite at 9:10 AM on June 16 [4 favorites]


All past and future g commands are the personal property of Richard Stallman, who in 1983 was granted an exclusive, perpetual, irrevocable, worldwide license to the entire g namespace.
gDAL developers: Hold my beer!
posted by klanawa at 9:10 AM on June 16 [1 favorite]


There's a certain irony that the author considers "step" to be a good name for a public key encryption toolkit. Surely that violates their own commandment - Don't make broad claims on generic words..
posted by leo_r at 9:10 AM on June 16 [8 favorites]


cat ./somefile.txt | grep keyphrase | awk '{print $1}'|grep -v unwantedphrase

awk '/keyphrase/ && !/unwantedphrase/ { print $1 }' ./somefile.txt
posted by 1970s Antihero at 9:20 AM on June 16 [8 favorites]


theodolite: "And let's hear for which"

⚠ SC2230: which is non-standard. Use builtin 'command -v' instead.
posted by namewithoutwords at 9:21 AM on June 16 [2 favorites]


A recent command name I like is rg, because it is just astoundingly fast. It's so fast it makes me love the name.

Re: "step" happens to be a product of the company the author works for.

Re: which. I'm glad you chose which python:

which python
~/.pyenv/shims/python

posted by bdc34 at 9:22 AM on June 16


1970s Antihero, that's not quite the same if unwantedphrase appears in fields besides the first.
posted by paper chromatographologist at 9:31 AM on June 16 [1 favorite]


sl is the best named Unix command line program.
posted by Nelson at 9:32 AM on June 16 [11 favorites]


My favorite command at present is fuck.

➜ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

➜ fuck
sudo apt-get install vim [enter/↑/↓/ctrl+c]
[sudo] password for nvbn:
Reading package lists... Done

posted by signal at 9:39 AM on June 16 [15 favorites]


Re: fuck -- I used it for a while because it was funny, but there's a sort of defeatist resignation to typing it. I much prefer to type the old sudo !!, which feels much more active and forceful, and allows me to feel like I'm blaming the terminal rather than myself.
posted by Ickster at 10:18 AM on June 16 [12 favorites]



awk '/keyphrase/ && $1 !~ /unwantedphrase/ { print $1 }' ./somefile.txt

is the equivalent of

cat ./somefile.txt | grep keyphrase | awk '{print $1}'|grep -v unwantedphrase

posted by ecco at 10:35 AM on June 16 [2 favorites]


sl is the best named Unix command line program.

For many years I had alias dir="echo This isn't DOS, you moron!" in my .bashrc.
posted by 1970s Antihero at 10:38 AM on June 16 [6 favorites]


allows me to feel like I'm blaming the terminal rather than myself.

alias dammit='fuck'

posted by snuffleupagus at 10:44 AM on June 16 [1 favorite]


I have a bash script in my path called gerp, which runs grep and transposes some random adjacent characters in each line of the output, because Past Me hates Future Me.
posted by confluency at 11:24 AM on June 16 [21 favorites]


Kurt Schwitters sound poem, or all of the valid two-letter commands on my Linux box? You decide:
al an ar as at bc bg cc cd ci co cp dd df dh do du ed ex fc fg fi gc go gs gv hd ht ia id if in ip iw jq la lc ld ll ln lp ls lz mf mg mt mv nc nl nm od pr ps pv qm qx rb ri rm rx rz sb sg sh sn ss su sx sz tc tr ua ul uz vi wc xz
I'm disappointed that only 11% of the two character command space is used. Where is the efficiency?

Only three single letter commands (l q w) are used. Lots of tlc, tho:
apg apt arc atc atd atq awk bas bcd cal cat cct ccx cli cmp col cpm cpp csl cut cvs cvt dab dig dir dot dsk dwp dwz ebb env eog eqn erb fdp fim fmt for ftp gcc gem ghb gie gio git gjs gpg gpm grn gsf gtf hcd hls ico irb jar jdb jfr jjs jps ksu lar lcf ldd let lex lpc lpq lpr mag man mcd mcs mdu mev mft mmd moc mrd mtr net nop nqp ode pic pig pom pon ppt pry ptx pwd qjs qml qxx raw rcc rcp rcs rec red rev rmt rsh scp sed see seq set sol sox ssh sum svn tac tar tbl tee tex tgz tic tie toe top tty ucf ufw uic vam vim vlc vpe who wtf xev xfd xgc xjc xsd xsm xwd xxd yes zic zip
posted by scruss at 11:59 AM on June 16 [3 favorites]


An aside, but the word "root" is a very common alternative word for "fuck" in Australia and New Zealand (maybe some other places as well - normally used in the expression "it's rooted" meaning something is broken/fucked beyond repair, but also sometimes in the expression "I got a root last night" - meaning......well..exactly what you'd think it does). I still chuckle whenever I hear anyone ask if they can have root access, or go to to a security conference and people are wondering around with "got Root?" t-shirts on, or someone announces they've "got root in someone else's box" during a security presentation etc. So the fuck command sits nicely with that.

(as an aside don't even get me started that there was a "Mr Rooter - rooting with a smile" plumber van in our neighborhood. Hilarity every time Mrs Inflatablekiwi and I walked past it.)
posted by inflatablekiwi at 12:07 PM on June 16 [4 favorites]


I mentioned 'sl' to one of my co-workers as a joke years ago, and he installed it on a whole suite of Raspberry Pi's that the entire team and several others were using. It became unfunny pretty quickly, although from a certain vantage point it was definitely still funny.

My personal favourite is tac, purely because of the name. You want a command like cat, but you want it to reverse every line? So you want a backwards cat? Ok, so call it tac!

What does this command do?
echo "head\ntail" | cat | tac | cat | tac | cat | tac


Well, it's a cat chasing its own tail, of course! :)
posted by Arandia at 12:12 PM on June 16 [1 favorite]


My favourite is "man kill"
posted by McNulty at 12:40 PM on June 16 [1 favorite]


I'm annoyed by youtube-dl. Youtubedl would have been fine, why are you making me reach for a hyphen every time to type this?
posted by Canageek at 1:32 PM on June 16


This is a top post.
posted by farlukar at 1:41 PM on June 16


In 1975, george Coulouris named his improvement on the ed text editor* em -- "editor for mortals". The new editor allowed you to see changes to the line you were editing in real time. He chose that name because Ken Thompson didn't really see the need for such a luxurious accommodation. The following year he showed it to Bill Joy at Berkeley, who was inspired to make vi. Full story here...

* obligatory humour document about ed omitted.
posted by Chef Flamboyardee at 2:13 PM on June 16 [2 favorites]


I'm annoyed by youtube-dl. Youtubedl would have been fine, why are you making me reach for a hyphen every time to type this?

Tab completion is your friend. you[tab]...
posted by mikelieman at 2:24 PM on June 16 [1 favorite]


Tab completion is your friend. you[tab]...

Or, add this to the end of your .bashrc:

alias youtubedl=youtube-dl
posted by axiom at 3:01 PM on June 16 [1 favorite]


axiom: "Or, add this to the end of your .bashrc:"

I think you misspelled "your .zshrc:"
posted by signal at 3:05 PM on June 16 [2 favorites]


About twenty years ago I was so proud of my cleverness, aliasing the command exeunt to close all my open terminals at once.

Then, about nineteen years ago I regretted my cleverness when I forgot that one of my terminals was executing a data migration script, with no way to resume or roll back if it was interrupted.
posted by Riki tiki at 3:30 PM on June 16 [5 favorites]


In 1975, george Coulouris named his improvement on the ed text editor* em -- "editor for mortals".

I remember Bob Eager telling the story of how the Unix hackers at UKC tried out em but quickly discovered that having an editor whose name is one fingerslip away from rm wasn't a great idea...
posted by offog at 3:33 PM on June 16 [5 favorites]


Then, about nineteen years ago I regretted my cleverness when I forgot that one of my terminals was executing a data migration script, with no way to resume or roll back if it was interrupted.

gotta nohup that stuff
posted by RustyBrooks at 3:34 PM on June 16 [5 favorites]


I am positively delighted, in these troubled times, to have a thread where I can become righteously enraged and shake my tiny fist over useless uses of cat(1), as opposed to, say, state-sponsored genocide.
posted by sourcequench at 3:43 PM on June 16 [2 favorites]


Tab completion is your friend.

I just realized, I've been saying that since TOPS-20. ( well, I guess back then it was "Esc completion is your friend")
posted by mikelieman at 3:45 PM on June 16


Then, about nineteen years ago I regretted my cleverness when I forgot that one of my terminals was executing a data migration script, with no way to resume or roll back if it was interrupted.

nohup is your friend...


(yeah, what rusty said)
posted by sammyo at 5:19 PM on June 16


*cries
posted by clavdivs at 6:50 PM on June 16


finger should probably be renamed
posted by going To Maine at 6:51 PM on June 16 [4 favorites]


I am currently the project manager in charge of pip and am working with user experience experts to (among other things) help us create usability guidelines and to name (and maybe rename) some command-line flags. And my colleagues are discussing whether and what to rename a new PEP517-related utility. So, thank you signal for posting this; relevant to my interests.
posted by brainwane at 7:25 PM on June 16 [5 favorites]


You're very welcome and I must admit I'm a bit starstruck. Thank you for your service!
posted by signal at 7:52 PM on June 16


I grep recursively every single day, but I would never put a command named rg into my name space to do that. Two character command names are a crime against autocomplete.
posted by 3j0hn at 8:10 PM on June 16 [1 favorite]


finger should probably be renamed
That’s the plan!
posted by Cogito at 1:46 AM on June 17 [5 favorites]


And then there's
Q: Why is the cat command named cat?
A: Because what comes out looks like what goes in.

(Which presumably predates the phenomenon of high-quality cat food.)
posted by acb at 3:00 AM on June 17 [2 favorites]


I still chuckle whenever I hear anyone ask if they can have root access, or go to to a security conference and people are wondering around with "got Root?" t-shirts on, or someone announces they've "got root in someone else's box" during a security presentation etc.

I used to be like that and then I worked on a garbage collector for a bit. garbage collection is rife with roots and rooting of many kinds and now I'm utterly numb to the innuendo.
posted by nnethercote at 3:11 AM on June 17


Though, given the way that sexual innuendo can shade over into harassment and/or a hostile environment for people who aren't performatively horny heterosexual dudes, perhaps it's time for root as the superuser account name to go the way of master as the trunk git branch name, at least in Australia and New Zealand.

(Prediction: New Zealand's UNIX users will embrace the change, renaming their root accounts to admin or something; Australian UNIX users will proudly keep theirs as root, because great Aussie Larrikin Spirit and the freedom to make off-colour jokes is the one thing our convict ancestors and/or the ANZACs died for or something.)
posted by acb at 3:22 AM on June 17


I really enjoyed this — thanks! I mostly use the command line for image and video processing (& git), so I think about convert and ffmpeg a lot. My last Saturday project was ffmfriend, which wraps up many of my commonly used ffmpeg commands into nicer, shorter ones. It breaks most of the rules, but also feels just right for what it does.
posted by dame at 5:08 AM on June 17 [3 favorites]


We use IBM's Load-sharing Facility (LSF) a fair bit at work, and as part of this a fair number of basic commands have their 'lsf' equivalents, for operating on remote jobs. For unknown reasons these commands all use 'b' as their name prefix. This means that you can 'bkill' your jobs, but also that the command to see your running jobs is literally 'bjobs'. So... ya.

Probably another one of those names that really should be changed. Of course given backward compatibility I can't see how it ever actually would be renamed, but that's another matter I guess.
posted by Arandia at 1:05 PM on June 17


VMS's disk repair and test suite had the worst name, though.
posted by scruss at 1:40 PM on June 17


Then, about nineteen years ago

screen
posted by Jubal Kessler at 8:39 PM on June 17


touch is a very simple command, with a very simple purpose, but I think it’s also well-named.
posted by going To Maine at 10:49 PM on June 17 [2 favorites]


My last Saturday project was ffmfriend, which wraps up many of my commonly used ffmpeg commands into nicer, shorter ones,

Is this online somewhere? Because googling ffmfriend from work would likely get me in trouble if I worked for a company that monitored my searches.
posted by suetanvil at 2:48 PM on June 18


« Older How Racist Was Flannery O'Connor?   |   "Who in Alaska is going to listen to me?" Newer »


You are not currently logged in. Log in or create a new account to post comments.