Unix Questions

What is vi?

Think of vi as a primative word processor. It lets you create and modify your Fortran programs, on any machine with the Unix operating system. If you move a file created by vi to your favorite PC, your word processor will probably tell you that the file is in ASCII (DOS) Text Format. Note that the Fortran compiler insists on taking files in this format. It won't know what to do with a file written in standard WordPerfect or Microsoft Word formats.

How do you access executable files in Unix?

The simple answer is that you just type the name of the file and it executes. The more complicated answer, is that the system needs to specify the directory containing the file in a system variable called the path. Otherwise you must either change to the directory containing the executable file before typing its name, or type the full file name including the "/" delimited list of all subdirectories above the file. Sometimes you can be in the directory with the executable file, type its name, and it won't execute. There are normally two reasons for this failure. The file has not been declared to be executable (shouldn't happen in this class). See the manual pages on "chmod" to learn how to declare a file executable. The second reason for failure to execute is that the "path" system variable does not contain a simple "." (abbreviation for current directory). Either modify "path" in your ".cshrc" file, or include "./" before the filename that you type. For example, if you are in the directory of a file "a.out" that you have just created with a compilation, and typing "a.out" doesn't start the program, try typing "./a.out".

Up one level / Home

Maintained by John Mahaffy : jhm@cac.psu.edu