r4 - 17 Jun 2009 - 20:58:22 - MikeRedmondYou are here: TWiki >  StatDocs Web  > StatBiofiles

Accessing Biostat Files and Other Remote File Systems In Statistics

Graphical Secure FTP on Unix

It is possible to access remote files on most Unix based systems using command line methods described in CSL's Transferring Files to a Remote System HOW-TO. An alternative method is to use Graphical FTP (gftp) to provide a more flexible point-and-click interface to access remote file systems. To get the full advantage of gftp, a customized gftprc file needs to be placed in your ~/.gftp directory. Additional files should also be placed in the ~/.gftp directory to provide icon images that help identify file types in the gftp display windows.

Creating Custom gftp Settings

The first step is to create a ~/.gftp directory. If you have run gftp previously, the directory will already be there. If you have not previously run gftp, the easiest way to create the directory is to execute the gftp command. For example, on public06:

public06% gftp &

(the & puts gftp in the background so you can continue using the terminal window for other things)

This will bring up a gftp window that you can immediately close down through the pulldown menu FTP->Quit. After this, you will find the directory ~/.gftp and the configuration file ~/.gftp/gftprc. To customize gftp, we will replace the gftprc file, but this can only be done while gftp is not running.

Open the Statistics gftp custom settings directory in a new window (right-click->Open Link in New Window) and right-click->Save Link As (or equivalent for your browser) on gftprc. For the File name use ~/.gftp/gftprc and click Save and OK to replace existing gftprc. Save the .xpm files in the same way to the ~/.gftp directory. These are the icon image files.

Using gftp

Start gftp as shown above:

public06% gftp &

Connecting to a Remote Host

Enter an appropriate remote host name in the Host: box, for example adhara.biostat.wisc.edu. Enter your user ID in the User: box, and your password in the Pass: box. Then hit the Enter key or left-click on the connect icon (two terminals) on the left of the gftp window.

Navigating the File Systems

Navigation is either point-and-click or by entry of a specific directory to view in either the Local or Remote directory box. You can get back to your home directory on the local or remote system at any time by entering ~ in the Local or Remote directory box respectively. The first line of the directory listing is the .. to go up one directory.

WARNING

Do not use the .. to go up to the root directories. If you do, and if you get to the /afs directory, gftp will lock up waiting for information from all AFS systems all over the world. Instead of navigating up and then back down, it is better to enter the approximate place you want to go to in the directory box.

Working With Files

As you view your file directories, you will see icons on the left that help identify the file type. There are icons for PDF, PS, TEX, Excel, Powerpoint, Word, sound and image files. Hopefully these are helpful, but if you think some files need special or different icons, please send a message to lab@stat.wisc.edu.

To work with a specific file, first left-click once on it (remember, you must first left-click on a file to work with it). Many files can be directly manipulated from the remote directory listing. To do so, use the pull-down with right-click. You can then select the action you prefer. Select Edit if you intend to make changes to the file that should be reflected on the remote system. Select View if you only intend to look at the file, possibly for printing, but do not want to change the contents of the file on the remote system. Edit and View work with a number of file types, including files with extensions .doc, .xls, .ppt and .txt. Files with extensions of .pdf, .ps and .dvi will by default be opened for viewing, but cannot be edited in the viewer.

Once you have opened a file with the Edit or View selection, the file can be viewed or manipulated in the Statistics computing environment. This is especially useful for printing. For example, if you View a PDF file this way, you can select the File->Print pulldown on the Acrobat Reader. You will see the default Statistics selection for printing. When you click OK, the page(s) will be printed on the selected Statistics printer.

When you are done viewing or editing the file, you can exit the application (typically File->Exit). If you made changes to the file, you will be asked to Save those changes, and you can decide Yes or No. After you have exited the application, gftp will ask if you want to upload the changes back to the remote system (this is if you originally selected Edit rather than View). Answering Yes will update the file on the remote system.

WARNING

If you only right-click on a file that has not already been selected with a left-click, everthing looks great in the pull-down menu and you will be tempted to select a command like Edit. However, that command will be applied to the currently selected file, and not the one that is under the pointer. This is likely to happen several times until you get used to the system. It is a problem with the gftp user interface that maybe will be fixed someday.

Transferring files

Not all files can be opened and manipulated from the remote file window. It would be difficult, for example, to run a data analysis application on a Statistics computer while the input and output files reside on the Biostat system. In these (and other) cases, it is more useful to do a one time download transfer of data files from Biostat to Statistics, and once the analysis is complete, do a one-time upload of the results back from Statistics to Biostatistics.

A file can be transferred either direction in two steps by left-click once on the file, then left-click on the appropriate arrow box, or in one step by double-left-click on the file.

A recommended approach to managing file transfers is to create a directory /scratch/briefcase on your Statistics computer. This is particularly useful if you are the primary user of the Statistics computer. gftp is set to default open /scratch/briefcase as the local directory, if that directory exists. Once you create the directory, the next time you start gftp, you will see /scratch/briefcase as the local directory in the left panel, probably with nothing in it. You may want to create a parallel directory on the remote machine, possibly in ~/private/briefcase, and use that directory to keep the files synchronized between the two computers. Using /scratch on the Statistics side saves allocated space in the AFS file system. However, keep in mind that /scratch is not backed up, so the /scratch/briefcase directory should be considered temporary only, and should always be replicated in some way on the remote system. The remote version should be considered stable and "official"

More on gftp

If you are interested, there are additional options, customizations and settings available with gftp. The documentation is limited, but what there is can be found at http://gftp.seul.org/.

-- MikeRedmond - 22 Sep 2005

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Statistics Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback