Pittsburgh Supercomputing Center 

Advancing the state-of-the-art in high-performance computing, communications and informatics.

The FAR program

far runs on blacklight and salk, and operates in one of two modes:

  • Single-line mode, permitting you to execute one far command. This mode is best suited for use within batch jobs.

    Following the single-line link will also take you to documentation describing the error codes returned in single-line mode. We recommend that you use single-line mode in batch jobs and check the error code returned to see if your far command was successful.

  • Command mode, permitting you to start far and execute as many commands as you wish before exiting. This mode is best suited for your interactive work. Since you are not checking error codes to see if your far commands have succeeded you should use other means, such as a far ls command, to check that your far commands have worked.

Regardless of the mode you use, you communicate with the storage resource, PSC's Data Supercell (patent pending), through a variety of far sub-commands.

Type far help for a complete, current list of commands available in the FAR user interface.

Single-line mode

Using far in single-line mode allows you to execute only one far sub-command at a time. It is very useful in batch jobs, when you want to retrieve a file before you begin program execution, or store the output of a job.

To use far in single-line mode, type

far sub-command

You are returned to the machine prompt immediately after the command executes.

There are many far sub-commands available.

I/O redirection is available in single-line mode but not in command mode.

Error codes

In single-line mode, you can trap the exit code returned by far, and act upon any errors you'd like. We recommend that you always check the error return code to see if your far command succeeded.

These are the error codes returned by far:

0 - Successful
1 - Failure, retry necessary.
2 - Unknown far command, don't retry.
3 - Far command argument problem.
4 - File doesn't exit.
5 - Unknown machine type.

Command mode

To use far in command mode, type


You will get an far> prompt. You can then use any of the available commands. When you want to exit far, type quit.

Wildcards can be used in command mode in the ordinary way, without being "escaped" as in line mode.

You cannot use piping or I/O redirection in command mode. Command mode cannot be directly used in a batch job. However, you can use a "here document" in a batch job as input to far:

far <

For more information on here documents, refer to your favorite UNIX reference manual.

Stay Connected

Stay Connected with PSC!

facebook 32 twitter 32 google-Plus-icon