缩写习惯

无聊和乏味的工作是罪恶

-- Eric S. Raymond

构建于图形界面之上的操作系统,使用鼠标作为主输入设备, 是否使用缩写并不重要。比如 Windows 系统中的目录,几乎都是全称…… 点击两次鼠标进入文件夹 pf, 并不意味着点击13次才能进入文件夹 Program Files

而构建于命令行之上的操作系统,如 Linux,只要3个字母以上的单词,几乎都要缩写。 例如: cd 命令是 Change Directory 的缩写。 作为常用命令,如果使用它的全称 Change Directory,绝对是无聊和乏味的工作。

最常见的缩写,取每个单词的首字母,如

cdChange Directory
ddDisk Dump
dfDisk Free
duDisk Usage
pwdPrint Working Directory
psProcesses Status
PSPrompt Strings
suSubstitute User
rcRun Command
TclTool Command Language
cupsCommon Unix Printing System
aptAdvanced Packaging Tool
bgBackGround
pingPacket InterNet Grouper

如果首字母后为“h”,通常保留

chshCHange SHell
chmodCHange MODe
chownCHange OWNer
chgrpCHange GRouP
bashBourne Again SHell
zshZ SHell
kshKorn SHell
sshSecure SHell

递归缩写[3]也属于这一类,如:

GNUGNU’s Not Unix
PHPPHP: Hypertext Preprocessor
RPMRPM Package Manager
WINEWINE Is Not an Emulator
PNGPNG’s Not GIF
nanoNano’s ANOther editor

有些缩写可能有多种定义,如:

  1. rpm
  2. RPM Package Manager
  3. RedHat Package Manager
  4.  
  5. bc
  6. Basic Calculator
  7. Better Calculator

这方面 Emacs 可谓独领风骚:

  1. Emacs
  2. Editor MACroS
  3. Emacs Makes A Computer Slow
  4. Escape Meta Alt Control Shift
  5. Emacs Makers Are Crazy Sickos
  6. Emacs Makes All Computing Simple
  7. Emacs Makefiles Annihilate C-Shells
  8. Emacs Manuals Always Cause Senility
  9. Emacs May Allow Customized Screwups
  10. Emacs Manuals Are Cryptic and Surreal
  11. Eventually Munches All Computer Storage
  12. Eight Megabytes And Constantly Swapping
  13. Elsewhere Maybe All Commands are Simple
  14. Excellent Manuals Are Clearly Suppressed
  15. Emacs May Alienate Clients and Supporters
  16. Except by Middle Aged Computer Scientists
  17. Extended Macros Are Considered Superfluous
  18. Every Mode Accelerates Creation of Software
  19. Each Manual's Audience is Completely Stupefied
  20. Exceptionally Mediocre Algorithm for Computer Scientists
  21. Easily Maintained with the Assistance of Chemical Solutions
  22. Eradication of Memory Accomplished with Complete Simplicity

如果只有一个单词,通常取每个音节的首字母:

cpCoPy
lnLiNk
lsLiSt
mvMoVe
rmReMove

对于目录,通常使用前几个字母作为缩写:

binBINaries
devDEVices
etcETCetera
libLIBrary
varVARiable
procPROCesses
sbinSuperuser BINaries
tmpTeMPorary
usrUnix Shared Resources

这种缩写的其它情况

diffDIFFerences
calCALendar
catCATenate
edEDitor
execEXECute
tabTABle
regexpREGular EXPression

如果某种缩写比较深入人心,例如“mesg”代表“message”,在新的复合缩写中,将沿用这种缩写方式

dmesgDiagnostic MESsaGe
sedStream EDitor
sttySet TTY
fstabFileSystem TABle
passwdPASSWorD

有些缩写中,第一个字母“g”,代表“GNU”

awkAho Weiberger and Kernighan 
gawkGNU AWK 
gpgGNU Privacy Guard 
grepGNU Regular Expression Print 
egrepExtended GREP 

[3] 定义中包含自身缩写,如 GNU:

GNU‘s Not Unix

使用这个定义来解释定义中的缩写:

(GNU’s Not Unix)’s Not Unix

这意味着它是可以无限递归的:

(((((GNU’s Not Unix)’s Not Unix)’s Not Unix)’s Not Unix)’s Not Unix)’s Not Unix ……