Two-Character Unix Commands

Here’s a fun survey question: name as many two-character Unix commands as you can and say what they do.

Let’s be precise about what we mean by a “command”:

  • Shell aliases like la are not commands.
  • Shell built-in commands count as commands; over time the shell incorporated directly things that were previously separate executables in Unix.
  • Commands not available in a wide variety of Unix distributions by default don’t count. In other words, if you have to install some optional package to get the command then it isn’t a “Unix” command.
  • Optional: Only allow commands included in a “classic” Unix from Bell Labs.

Ready? Let’s go.

Command Description
ar Archive librarian
as Assembler
at Execute commands at a later time
bc Arbitrary precision calculator
bg Run suspended command in the background
cc C compiler
cd Change directory
cp Copy files
dc Desk calculator
dd Convert and copy files
df Disk free space
du Disk usage
ed Line-oriented editor
ex Extended line-oriented editor
fg Resume suspended command in the foreground
ln Make soft links
lp Print files
ls List files
m4 Macro processor
mt Magnetic tape control
mv Move files
nl Number lines
nm Dump symbol table information
od Octal dump
pr Prepare files for printing
ps Process status
rm Remove files
sh Shell
su Super user
tr Translate characters
ul Underlining
vi Visual editor
wc Word count

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: