A Little Bit of UNIX

Some essentials about the UNIX operating system and your account on hardin:

Just as with any computer system, you will quickly generate multiple files stored on your hardin account.

  • File names on UNIX are sensitive to upper and lower case, e.g, Myfile and myfile are different.
  • Unlike DOS and even Macintosh, UNIX file names can be up to 255 characters long.
  • File names can have any character except a slash,/.
  • Some file types are recognized by their extensions, e.g., SPSS "system" files are tagged with a .sav extension--i.e., states.sav.

Under UNIX, similar to DOS, files can be organized in a hierarchical fashion under directories, which are separated by slashes.

  • Each of you have a "home directory," which is your working directory when you log in.
  • Any time at the UNIX prompt, you can determine what directory you are in by typing pwd for print working directory.
  • Because directories can be confusing under UNIX, I will suggest that you not try to create different directories but that you store all your files in your default working directory.
There are different ways to list the files stored in your working directory, according to these commands:
  • ls lists the contents of your working directory in ascending order, organized into vertical columns to fill the width of the screen.
  • ls -l lists its contents with additional information: showing the file mode, number of links, owner, size in bytes, and time of modification--more knowledge than you probably want.

Changing the name and copying files:

  • UNIX has no "rename" command but mv (move) will rename a file: mv [oldname] [newname]
  • Files can be copied as follows: cp [filename1] [filename2]
  • Files can be removed as follows: rm [filename]

The main way to view text files at a UNIX prompt is with a program called "more":

  • type more [filename] to display the file
  • Some major commands you will need:
    • pressing the space bar moves the screen forward
    • type b to page backward
    • G goes to the end of a file
    • g goes to the beginning
    • h displays a brief help display and command summary
    • typing q terminates the listing

How to log out of UNIX:

  • use logout or exit
  • Other suspects--log, logoff, quit--will not work.

Concerning printing SPSS output:

The doit print option (4) prints nicely formatted SPSS output on a laser printer in Room 115 of the Cresap Laboratory. The output will be labeled with your netid, but you'll have to sort through other output to find it. This location may be convenient for some students, but not for others.

Perhaps the better procedure for most of you is simply to select and copy the SPSS output from your computer screen and dump it into a word processor. BUT NOTE: If you copy SPSS output for entry into a word processor be sure to change the font to a mono-spaced font, such as Courier, to preserve the spacing in the tables. If you view the output in a proportionally spaced font, such as Times, the tables will almost be unreadable.