Is `who mom likes` a real linux command?
Yes it's a joke, included in by the developers of the who
command. See the man page for who
.
excerpt
If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common. If ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are usual.
This U&L Q&A titled: What is a "non-option argument"? explains some of the terminology from the man page and my answer also covers alternatives to who .. ...
. commands.
Details
There really isn't anything special about am I
or am i
. The who
command is designed to return the same results for any 2 arguments. Actually it behaves as if you called it with its -m
switch.
-m only hostname and user associated with stdin
Examples
$ who -m
saml pts/1 2014-01-06 09:44 (:0)
$ who likes candy
saml pts/1 2014-01-06 09:44 (:0)
$ who eats cookies
saml pts/1 2014-01-06 09:44 (:0)
$ who blah blah
saml pts/1 2014-01-06 09:44 (:0)
Other implementations
If you take a look at The Heirloom Project, you can gain access to an older implementation of who
.
The Heirloom Toolchest is a collection of standard Unix utilities.
Highlights are:
- Derived from original Unix material released as Open Source by Caldera and Sun.
The man page that comes with this who
in this distribution also has the same "feature", except it's more obvious.
$ groff -Tascii -man who.1 |less
...
SYNOPSIS
who [-abdHlmpqRrstTu] [utmp_file]
who -q [-n x] [utmp_file]
who [am i]
who [am I]
...
...
With the two-argument synopsis forms `who am i' and `who am I', who
tells who you are logged in as.
...
...
The command is who
. You can give it any argument such as mom likes
and Linux won't complain. Its purpose is to get a list of people logged into the system.