| Rev | Author | # | Line |
|---|---|---|---|
| 1 | JohnMcPherson | 1 | Two letter commands commonly found in Unix. |
| 2 | |||
| 3 | [Unix] has a reputation for having cryptic commands and syntax. | ||
| 4 | Commands marked with * are not as common, or are not so standard (ie distributed with a typical system).''Disclaimer'' - this is based on personal observation of unix systems, and is in no way definitive. | ||
| 5 | |||
| 6 | | ar(1) | archive tool | ||
| 7 | | as(1) | assembler | ||
| 8 | | at(1) | run commands AT a certain time | ||
| 9 | | bc(1) | arbitrary precision calculator | ||
| 10 | | cd(1) | Change Directory (now a builtin) | ||
| 11 | | cp(1) | copy | ||
| 12 | | dc(1) | desk calculator | ||
| 13 | | dd(1) | copy blocks between files/devices | ||
| 14 | | df(1) | report Disk Free | ||
| 15 | | du(1) | report Disk Usage | ||
| 16 | | ed(1) | EDitor | ||
| 17 | | gs(1) * | GhostScript (postscript interpreter) | ||
| 2 | CraigMckenna | 18 | | gv(1) | GhostView (postscript viewer) (X based) |
| 1 | JohnMcPherson | 19 | | id(1) | prints user ID |
| 20 | | ld(1) | linker | ||
| 21 | | ln(1) | create symbolic !LiNks | ||
| 22 | | lp(1) | send file to (Line) Printer | ||
| 23 | | ls(1) | !LiSt directory | ||
| 24 | | m4(1) * | m4 language processor | ||
| 25 | | mt(1) | Magnetic Tape control | ||
| 26 | | mv(1) | !MoVe files | ||
| 27 | | nm(1) | extract symbols from objects | ||
| 28 | | od(1) | print Octal Dump of files | ||
| 29 | | ps(1) | print Process Status | ||
| 30 | | pr(1) | paginate input for PRinting | ||
| 31 | | rm(1) | !ReMove files | ||
| 32 | | rn(1) | Read News | ||
| 33 | | sc(1) * | Spreadsheet Calculator | ||
| 34 | | sh(1) | SHell | ||
| 35 | | sq(1) * | SQueeze a sorted list | ||
| 36 | | su(1) | Switch User (or Super User) | ||
| 37 | | tr(1) | TRanslate (swap) characters | ||
| 38 | | vi(1) | VIsual Editor | ||
| 39 | | wc(1) | Word Count | ||
| 5 | zcat(1) | 40 | |
| 41 | |||
| 42 | ''Since ls(1) is such an often-used and occasionally mistyped command, there's an amusing little program '[sl|http://gar.lnx-bbc.org/cvs/gar/games/sl/]' which does an animated Steam Loco.. It comes with freeBSD but there's probably a Linux port if you're really interested. - zcat'' (sl is in debian. But if you're like me the novelty will wear off pretty quickly as you can't use your terminal for a few seconds until the Steam Locomotive has gone across it). | ||
| 8 | DanielLawson | 43 | |
| 44 | The following command will list all TwoLetterCommands on your system: | ||
| 45 | |||
| 46 | find {,/usr}/{,s}bin -type f | grep "/..$" | ||
| 47 | |||
| 48 | It looks in /bin, /usr/bin, /sbin, /usr/sbin for all files which have two letters in their name. On my Debian Woody system there are a number of ones not listed above, which are mainly just improved tools: lc is an improved wc, gw is a gnome version of 'w' (so thats a OneLetterCommand really... ;) | ||
| 9 | AristotlePagaltzis | 49 | |
| 50 | ''The above is wrong (or at least bad) in so many ways. It has a useless use of grep(1); find(1) can already match globs, so just tell it to look for __-name '??'__. It will recurse directories and find files not available for direct invocation (at least the [GNU] version of find(1) has __-maxdepth__ which can be used to fix this). It will also find files without execution permission. The following is much more precise.'' --AristotlePagaltzis | ||
| 51 | |||
| 52 | find ${PATH//:/ } -type f -name '??' -maxdepth 1 -perm +o+x | ||
| 53 | |||
| 54 | # if you don't have a bash-ish shell you need an extra process: | ||
| 55 | find `echo $PATH | tr : ' '` -type f -name '??' -maxdepth 1 -perm +o+x |
lib/blame.php:177: Warning: Invalid argument supplied for foreach()