|
|
| | * The reason for this is that the command line actually offers a surprising wealth of text processing tools, some of which are more powerful than the applications that we're accustomed to using. | | * The reason for this is that the command line actually offers a surprising wealth of text processing tools, some of which are more powerful than the applications that we're accustomed to using. |
| | * It is clear, however, that one needs a lot more "up-front" training with the command line, and that's what this page hopes to provide. | | * It is clear, however, that one needs a lot more "up-front" training with the command line, and that's what this page hopes to provide. |
| − | * To put things in context — as can be seen from the videos below, everything "old" will be new again: using the command line is ultimately a lot like "talking" to science fiction computers, but with typing and reading instead of talking and listening: | + | * To put things in context—as can be seen from the videos below, everything "old" will be new again: using the command line is ultimately a lot like "talking" to science fiction computers, but with typing and reading instead of talking and listening: |
| | ** http://www.youtube.com/watch?v=tpKx7Oi0oeM | | ** http://www.youtube.com/watch?v=tpKx7Oi0oeM |
| | ** http://www.youtube.com/watch?v=v9kTVZiJ3Uc | | ** http://www.youtube.com/watch?v=v9kTVZiJ3Uc |
|
|
| | == Command Line Basics == | | == Command Line Basics == |
| | | | |
| − | Working with a command line is a never-ending cycle of: | + | Working with a command line is a cycle (i.e., a loop) of: |
| | # The computer indicating that it is ready for the next command (via a ''prompt'') | | # The computer indicating that it is ready for the next command (via a ''prompt'') |
| | # The user (you) typing in a command | | # The user (you) typing in a command |
|
|
| | #* To completely start over, hold down the '''control''' key then hit '''c''' (i.e., "'''control-c'''"); you'll go back to a fresh prompt | | #* To completely start over, hold down the '''control''' key then hit '''c''' (i.e., "'''control-c'''"); you'll go back to a fresh prompt |
| | #* When you're ready with your command, hit the '''Enter''' or '''Return''' key | | #* When you're ready with your command, hit the '''Enter''' or '''Return''' key |
| − | #* Many users experience some fear with typing a command — this is understandable, but rest assured: | + | #* Many users experience some fear with typing a command—this is understandable, but rest assured: |
| | #** Typically, the worst thing that happens is that the computer did not "understand" the command, thus doing nothing | | #** Typically, the worst thing that happens is that the computer did not "understand" the command, thus doing nothing |
| | #** While there ''are'' harmful commands, (a) the likelihood of your typing one at random is very low, and (b) most modern operating systems (including the one on the Keck Lab workstations) will prevent you from doing the really dangerous stuff anyway | | #** While there ''are'' harmful commands, (a) the likelihood of your typing one at random is very low, and (b) most modern operating systems (including the one on the Keck Lab workstations) will prevent you from doing the really dangerous stuff anyway |
|
|
| | === The Command History === | | === The Command History === |
| | | | |
| − | To assist with this command entry cycle, modern command lines keeps track of the commands you type — essentially, a command ''history''. This history shows up in a number of ways: | + | To assist with this command entry cycle, modern command lines keeps track of the commands you type—essentially, a command ''history''. This history shows up in a number of ways: |
| | * If you press the '''up''' or '''down''' arrow keys at the command prompt, you will move back and forth through your history. If you see the command you'd like to perform, press '''Enter''' or '''Return''', and the computer will try to perform that command | | * If you press the '''up''' or '''down''' arrow keys at the command prompt, you will move back and forth through your history. If you see the command you'd like to perform, press '''Enter''' or '''Return''', and the computer will try to perform that command |
| | * You can do "variations" on past commands by immediately editing what shows up; that is, you can press the '''up''' or '''down''' arrow keys until you see a command that's similar to the one you want to do, then use the '''left'''/'''right''' arrow keys, backspace, and other keys to edit it | | * You can do "variations" on past commands by immediately editing what shows up; that is, you can press the '''up''' or '''down''' arrow keys until you see a command that's similar to the one you want to do, then use the '''left'''/'''right''' arrow keys, backspace, and other keys to edit it |
|
|
| | Typing this command ends your "command session" with the computer. Most of the time, this closes the window into which you've been typing your commands (typically called a "terminal"). Sometimes, you get a message that your session is finished, but you still need to close the window manually. In any case, ''exit'' means you're done, and you can quit whatever program you were using to get to the command line (e.g., ''Terminal'', ''PuTTY'', etc.). | | Typing this command ends your "command session" with the computer. Most of the time, this closes the window into which you've been typing your commands (typically called a "terminal"). Sometimes, you get a message that your session is finished, but you still need to close the window manually. In any case, ''exit'' means you're done, and you can quit whatever program you were using to get to the command line (e.g., ''Terminal'', ''PuTTY'', etc.). |
| | | | |
| − | * Since we just mentioned the '''Tab''' key, try this — type only the first two letters of '''exit''': | + | * Since we just mentioned the '''Tab''' key, try this—type only the first two letters of '''exit''': |
| | ex | | ex |
| | * Now hit the '''Tab''' key twice. You should see a list of command that start with '''ex''', similar to this: | | * Now hit the '''Tab''' key twice. You should see a list of command that start with '''ex''', similar to this: |
|
|
| | === Your “Working” Directory: pwd === | | === Your “Working” Directory: pwd === |
| | | | |
| − | On everyday computers, we frequently see a window — typically when we're trying to save our work or browse our desktop — that gives us a concept of "where" we are among all of our files. While we don't have such a window on the command line, the computer ''does'' keep track of what folder we're ''in''. This folder is called the ''working directory''. | + | On everyday computers, we frequently see a window—typically when we're trying to save our work or browse our desktop—that gives us a concept of "where" we are among all of our files. While we don't have such a window on the command line, the computer ''does'' keep track of what folder we're ''in''. This folder is called the ''working directory''. |
| | | | |
| − | :'''Terminology alert:''' The word ''directory'' is a synonym for what everyday computers call a ''folder''. They mean the same thing — a folder or directory is an entity on the computer that keeps files, some of which may themselves be more folders or directories. For this write-up, ''folder'' and ''directory'' will be used interchangeably, to get you accustomed to seeing both words. | + | :'''Terminology alert:''' The word ''directory'' is a synonym for what everyday computers call a ''folder''. They mean the same thing—a folder or directory is an entity on the computer that keeps files, some of which may themselves be more folders or directories. For this write-up, ''folder'' and ''directory'' will be used interchangeably, to get you accustomed to seeing both words. |
| | | | |
| | If, at any time, you forget "where" you are in your files, this command will display your working directory: | | If, at any time, you forget "where" you are in your files, this command will display your working directory: |
| | pwd | | pwd |
| − | You'll notice that, because commands involve a lot of typing, they tend to be brief or even abbreviated. While this makes them harder to remember, they still resemble what they mean to do; for example, '''pwd''' stands for '''print working directory''' — which is exactly what that command does. | + | You'll notice that, because commands involve a lot of typing, they tend to be brief or even abbreviated. While this makes them harder to remember, they still resemble what they mean to do; for example, '''pwd''' stands for '''print working directory'''—which is exactly what that command does. |
| | | | |
| | === Your “Home” Directory === | | === Your “Home” Directory === |
|
|
| | When you connect to a command line for the first time, the working directory typically starts at your user account's ''home directory''. This is the folder in which your user account is allowed to create files and otherwise do all kinds of other work. Most computers today have this concept; on Windows computers, your home directory is typically displayed as a folder icon with a name like ''Joe's Documents''. On Mac OS X computers, the home directory is typically displayed as a house icon with the same name as your login. | | When you connect to a command line for the first time, the working directory typically starts at your user account's ''home directory''. This is the folder in which your user account is allowed to create files and otherwise do all kinds of other work. Most computers today have this concept; on Windows computers, your home directory is typically displayed as a folder icon with a name like ''Joe's Documents''. On Mac OS X computers, the home directory is typically displayed as a house icon with the same name as your login. |
| | | | |
Unexpected non-MediaWiki exception encountered, of type "Error"
Error: Call to undefined function each() in /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php:374
Stack trace:
#0 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(480): _DiffEngine->_diag()
#1 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(291): _DiffEngine->_compareseq()
#2 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(175): _DiffEngine->diff_local()
#3 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(653): _DiffEngine->diff()
#4 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(820): Diff->__construct()
#5 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(1240): MappedDiff->__construct()
#6 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(1458): WordLevelDiff->__construct()
#7 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(952): TableDiffFormatter->_changed()
#8 /apps/xmlpipedb/biodb/fall2013/includes/diff/DairikiDiff.php(895): DiffFormatter->_block()
#9 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(765): DiffFormatter->format()
#10 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(655): DifferenceEngine->generateDiffBody()
#11 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(593): DifferenceEngine->getDiffBody()
#12 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(566): DifferenceEngine->getDiff()
#13 /apps/xmlpipedb/biodb/fall2013/includes/diff/DifferenceEngine.php(409): DifferenceEngine->showDiff()
#14 /apps/xmlpipedb/biodb/fall2013/includes/Article.php(725): DifferenceEngine->showDiffPage()
#15 /apps/xmlpipedb/biodb/fall2013/includes/Article.php(478): Article->showDiffPage()
#16 /apps/xmlpipedb/biodb/fall2013/includes/actions/ViewAction.php(37): Article->view()
#17 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(427): ViewAction->show()
#18 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(304): MediaWiki->performAction()
#19 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(536): MediaWiki->performRequest()
#20 /apps/xmlpipedb/biodb/fall2013/includes/Wiki.php(446): MediaWiki->main()
#21 /apps/xmlpipedb/biodb/fall2013/index.php(59): MediaWiki->run()
#22 {main}