Brief Unix Command Guide

This help file is intended to help users familiar with either MS-DOS, or VAX/VMS commands find the equivalent AIX (Unix) command. Optional arguments or switches will be denoted within square brackets "[]". Note that ALL AIX commands are entered in lower case. A space must follow the command before any arguments or switches. Almost all switches begin with a dash "-".

A home directory is the default for an account, and is one of two that the user may write into. In most cases, it will be /u1/your-username-here. For instance if one's username is jblow, the home directory would be /u1/jblow. At the moment, the operating system does not support disk quotas. As soon as disk quotas become available, users will be limited to 1 Megabyte of disk storage. One other writable directory will exist, and it is a temporary directory named /tmp. /tmp is 20 Megabytes and is used for temporarily storing data and intermediate files. Files in /tmp will be removed 24-48 hours after their last modifcation (unless the disk fills up and has to be cleaned up earlier).

All directories in AIX start at the root directory "/" and proceed down. Pathnames can be specified either absolutely (beginning with a /) or relatively (beginning with a directory). For instance, to change to /tmp from anywhere, the command "cd /tmp" is used. If it is desired to go from the current directory of /u1/jblow to /tmp using relative paths, one would type "cd ../../tmp". Here, ".." is the parent directory such that cd .. would take one to the /u1 directory, and cd ../.. would go to the root directory "/".

To log off of the workstations:

On an IBM RS/6000:

First, exit from any window manager that may be running (press the left mouse button while it is on the background, and select "Quit") At the prompt, enter "logout" and press return. At this point, it should return to the login: screen.

On a DEC 5000/125:

Select the quit option from the session manager. The screen should then be prompting for the next user to log in.

Some commands explained and translated:

ls

[-l -a] [directory...] VMS:directory DOS: DIR The ls command takes a variety of switches. The two most useful are -l, which gives a long directory listing (DIR/FULL on VMS). And -a which lists "hidden" files (a hidden file in AIX begins with a period "."). ls optionally takes a directory name also (eg, to list files in the /tmp directory: ls /tmp or ls -l /tmp).

\heading{cp} infile newfile VMS: copy DOS: copy To make a duplicate of a file, the cp command is used. This makes a "copy" of the file, with a new name. A full, or partial pathname can be used.

\heading{mv} name newname VMS: rename DOS: ren Giving a file a new name, without keeping the old, is accomplished by using the mv command. This command moves, or renames the file.

\heading{filename} VMS: run DOS: filename Executing a program is accomplished by simply entering the name of the executable file. There is no need for a 'run' command as on VMS.

\heading{cd} directory-name VMS: set default DOS: cd To change the current directory, the cd command is used. Either absolute or relative paths can be used (see above). cd entered with no directory will change the default directory to the users home directory.

\heading{mkdir} dir-name VMS: create/dir DOS: mkdir or md Making directories is accomplished using the mkdir command. Here again, either relative or absolute paths can be used. Only subdirectories under ones own home directory should be created. If one wants to create a subdirectory called scheme under a home directory, and that is the current default, then the command "mkdir scheme" will work. If the current directory is not the home directory, two easy ways exist of creating the file one is to specify a full pathname "mkdir /u1/your-username/scheme", the second is to go to the home directory, then enter the command "cd ; mkdir scheme".

\heading{rmdir} dir-name VMS: delete DOS: rmdir or rd Removing a directory is exactly the opposite of creating the directory. The only rule being that the directory has to be empty (contain no files). If the directory is not empty, an error is issued.

\heading{pwd} VMS: show default DOS: cd Finding out what directory is the current directory is accomplished using the print working directory command. Simply enter "pwd" and the current directory will be displayed on the screen

\heading{rm} file-name VMS: delete DOS: del Removing a file from the system is done with the rm command. Simply enter "rm file-name" where file-name is the name of the file to delete. ie, to remove the file Test from the current directory enter "rm Test".

\heading{cat} file-name VMS: type DOS: type Displaying a file uses the cat command. So, to display the file test in the current directory, enter "cat test".

\heading{pg} file-name If a long file is to be displayed, the pg command may be more useful. pg breaks the file into pages, and waits for the user to press return before continuing. A colon (":") prompt at the bottom of the screen indicates to press return for the next screen. Also at this colon, a "q" may be entered to quit the paging.

\heading{less} file-name A local command that has been added is the less command. It is an extension of the more familiar "more" command. less allows one to page forward and backwards through a file. After entering the less command, the space bar takes one forward a screen at a time, "b" is back a screen at a time, and "q" quits. Help is available by pressing "H" inside of less.

\heading{date} VMS: show time DOS: date or time The current date and time can be displayed by using the date command.

\heading{who} VMS: show users DOS: - Determining what other users are on the local workstation may be accomplished by using the who command. This will list the username, a terminal, and the date and time of login. If remotely logged in to the system, the remote system name will also be displayed. NOTE: This may or may not be correct. The file that indicates this will often get corrupted and show users logged on, even though they are not.

\heading{passwd} VMS: set password DOS: - To change a password, the passwd command is used. Issue passwd. Then, the old password is entered (so not just anyone can change a user's password), then a new password is prompted for, and finally a verification is asked for. Note that the passwords do not echo to the screen, for security purposes.

\heading{lpr} file-name VMS: print or SPOOL_TTan DOS: print Hardcopy of text files may be obtained by use of the lpr command. Simply enter "lpr file-name" to print a file. Help is available using the Unix command "man lpr".

\heading{elm} [username] (or \heading{mail} [username]) If you have E-mail (electronic mail), you will be notified upon login by a message such as "You have mail". To read your mail, enter the command "elm". Elm is a fairly straight-forward interface to the mailer system. Help is available from inside of elm by typing a question mark '?'. Outside of elm, at a Unix prompt, one can type "man elm" for a brief synopsis of elm.

The traditional Unix command for E-mail is mail. Type in the command "mail". Then, a list of users and subjects will be displayed. To read the first unread message, press the return key. To read a specific message, enter the messages number. When finished with a message, it can be deleted by pressing d. Messages that are not deleted are saved in a file called mbox in your login directory. To send mail to a user from the command line, follow the mail command with the username of the person to send to (mail admin). More help on mail is available from inside of mail by entering a question mark (?).

\heading{lnews} Information that is unique and important to UNL can be accessed by the lnews (Local News) command. Very important information is displayed on the screen upon login. This is the message of the day.

\heading{tin} Access to UseNet news is via tin. UseNet news is a worldwide collection of articles grouped into areas called newsgroups. Almost any imaginable topic is available via these newsgroups. For help on tin, enter the command "man tin", or, from inside tin, press the 'h' key.

\heading{man} The man command is used for finding out more information about a specific command. For instance, if one desires more help on the "ls" command, enter "man ls". This will bring up the relevant manual page. man is a "standard Unix" command for getting help.

\heading{info} There is also a more elaborate help structure on the IBM RS/6000's called InfoExplorer. This is accessed via the command "info". It is best utilized while running AIXWindows.

Please e-mail any comments about this help file to user admin.

A sample message is below:

\programexample{% mail admin Subject: unix help file I think it would be good to add the widget command to the unix help file. Thanks Wiley Coyote