You need to know some things about passwords, about connecting to the system, about logging in and logging out. The things in Labs 0 and 1 (as supplemented by your instructor in class) should serve you well here.
You should know how to send and receive electronic mail. That ability will allow you to send questions to your instructor if you have problems when your instructor isn't around.
Your instructor may give you handouts, and will give you URLs to world-wide web pages with information. Read these materials. Refer to them when you need information. Many of these materials contain enough information that you will miss some of it the first time (and sometimes not just the first time).
Most Unix systems have documentation on-line. You should note these items:
- man word
- If the on-line manual contains a "page" about word, this command will display it on your screen. For example, man man displays information about the man command.
- apropos keyword
- The apropos command locates commands by keyword lookup. When you type the command apropos word you will see a list of one-line descriptions of entries in the manual that contain word (in their one-line description). Follow up by using the man command to display one of the manual pages.
- learn
- Learn is a tutorial program available on some Unix systems. It contains a number of CAI 'courses' that you may find helpful. Learn is available on xx; invoke it by typing learn an the shell prompt ("%"). If you do that, you'll see:
I haven't gone through much of this stuff. I tried to access the "vi" lesson a few minutes ago and got an error message. So, maybe this suggestion isn't as good as it sounds.These are the available courses - files editor vi morefiles macros eqn C If you want more information about the courses, or if you have never used 'learn' before, press RETURN; otherwise type the name of the course you want, followed by RETURN.If you then press RETURN (or ENTER), you'll see:files - basic file handling commands editor - text editor; must know about files first vi - screen-oriented text editor; must know files first morefiles - more on file manipulations and other useful stuff macros - "-ms" macros for BTL memos & papers; must know editor eqn - typing mathematics; must know editor C - writing programs in the C language; must know editor This is probably the proper order, but after you have the "files" course and know the basics of "editor", try anything you like. (And some other stuff I'm omitting.)
If you have lots of time and energy on your hands, you may want to learn more about Unix on your own. There are lots of books about using Unix; you might want to get one and study it. (You shouldn't need to do that for this course.) Books about Unix vary widely in quality. Before you buy a book about Unix, you might want to ask your instructor for recommendations.
Here are some other commands that you might find useful. They're here in alphabetical order. If you think you need more information, use the man command (see above), or talk to your instructor.
- cd
- The command
cd directory_namechanges your current (working) directory to the named directory. The commandcd(i.e., with no arguments) changes your current directory to be your home directory.- logout
- Logs you out of the system. If you connected to the system using one of the systems in our labs, it also closes the window you were typing in. You must logout of the system; do not simply close the window or turn off the PC.
- ls
- The command
ls(with no arguments) lists the names of files in your current directory.Adding the options -CF, i.e., typing the command
ls -CFlists the names of the files in your current directory, listing them in multiple columns and appending a '*' to executable files and '/' to directories.The command
ls -lshows a long-form listing which includes a character indicating whether the file is a directory ('d') or an ordinary file ('-'), 9 characters describing the file permissions, the name of the file's owner, the file's size in bytes, when the file was last modified, and the file's name.Any of these forms can have wildcarded file names appended to them; that is, you can type things like:
ls -l file_name ls -l wildcarded_file_name ls -CF file_name ls -CF wildcarded_file_nameThese forms restrict the listing to files whose names match the wildcarding.There are lots of other things ls can do; consult the manual page (type the command man ls) for details.
- mkdir
- The command
mkdir directory_namecreates a directory with the given name.
- passwd
- The command passwd (with no arguments) can be used to change your password. You will be prompted to enter your old password and to enter a new one twice. Nothing will be echoed. If the command doesn't generate error messages, your password has been changed to the new one. As the systems are currently configured, you have distinct passwords on VMS, on xx, and on cs; changing the password on one of them does not affect the others.
- pwd
- The command pwd (with no arguments) displays the name of your current directory on the screen. If what you see appears to be an error message, consult your instructor.
- rm
- The command
rm file_nameremoves (deletes, erases) the named file. The argument file_name can be replaced with a wildcarded file name description; the command will remove all files that match the wildcarded name. Use wildcards here with great caution; there is typically no way to recover a file that you have removed.A variation on this command is the command
rm -i file_nameThe difference between this form and the first is that when the -i is there, the rm command will ask you whether to remove a file before it actually removes it. You can say no ('n').
- pr -f file_name | lpr -Pmsd
- This command line, a so-called pipeline, can be used to print the named file on the line printer in the lab in Walker Hall room 205. (The line printer is behind the partition; it is not one of the printers at the end of the first double table.)
The first part of the pipeline, the command "pr -f file_name", formats the file for printing by inserting page headings that contain the file's name and date. The second part of the pipeline, the command "lpr -Pmsd", sends the result of the first command to VMS for printing on the msd printer. The output you request is actually put in a queue, a waiting line, to wait its turn to be printed.
You can also print on the VMS line printer in the ACS lab in Raley Hall by changing the msd above to acs or on the line printer in the COB lab by changing the msd to cob.
According to the "message of the day" I saw on xx on September 11, 1996, it is not now possible to print from xx onto the printers controlled by the Novell server (e.g., the printers at the end of the first double table in Walker 205).
- lpq -Pmsd
- This command line asks the system to display a list of what is in the msd print queue. Look for entries bearing your user name. Since the VMS print queues are handled "shortest job first", new entries might slip ahead of a long printout you send to the queue.
A response of "no entries" normally means that your things have printed. Please note, however, that prints are only taken off the printer a few times an hour; it may be a while before you can pick up your output. Check the signs in the lab for times when prints are "pulled".
As in the lpr command above, you can address other print queues. Using -Pacs checks the queue for the ACS lab printer, and -Pcob checks the queue for the COB lab printer.
- cat file_name
- This command displays the named file on the screen. Actually that is a special case of what the cat command does. The command line:
cat file_1 file_2 ... file_nReads the named files (file_1, file_2, ...) and combines them into a single file (concatenates them) which it sends to "standard output" -- the screen. The command line:cat file_1 file_2 ... file_n > destination_fileconcatenates the named files and puts the result in the file named destination_file.
- cp
- The command
cp file_1 file_2copies the content of file_1 to a file named file_2. After the operation you have two independent copies of the same information.The command
cp file_1 file_2 ... directory_nameputs copies of the files, file_1, file_2, ..., in the directory directory_name. After the copy file_1 and directory_name/file_1 are independent copies of the same information. Likewise with file_2 and directory_name/file_2, and so on.
- date
- The date command (with no arguments) prints the current date and time. The output includes the day of the week too. For example, if I now type the command, I'll see this on my screen:
% date Wed Sep 11 14:50:39 EDT 1996 %
- finger
- The command
finger(with no arguments) displays some information about people who are currently logged on.The command
finger user_namedisplays some information about the named user. The commandfinger real_namewhere real_name is part of some user's real name, should show some information about that user.The command
finger user@internet_addressasks the system at internet_address for finger information on user. What happens depends on the system at internet_address; that system might send the information, might send some other message (perhaps a refusal), might "refuse the connection", or just might not respond (generating a long delay followed by a "connection timed out" message.
- more file_name
less file_name- These two commands are "pagers". A "pager" is a program that displays a file on your screen a screen-full at a time. More is the older program, and there are many versions of it. Currrent versions are usually capable of scrolling both forward and backward in the file and of doing searches. Less is more only more-so ;-). There are lots of versions of less around. Typically, less has more features than more.
If you type a lower case 'h' to either of these programs, you should see a "help screen".
- mv
- The command
mv file_1 file_2moves file_1 to a file named file_2. After the operation file_1 is gone and file_2 contains the information. The effect is that file_1 is renamed as file_2.The command
mv file_1 file_2 ... directory_namemoves the files, file_1, file_2, ..., to the directory directory_name. After the move, files file_1, file_2, ... appear in the named directory rather than where they were.
- rmdir
- The command line
rmdir directory_namewill remove the named directory if the directory is empty. If there are files in the named directory, the command will tell you that the directory isn't empty and will not remove the directory.
- who
- The who command, without an argument, lists the login name, terminal name, and login time for each current UNIX user. With two arguments, as in who am I (and also who are you) who tells who you are logged in as.