[Next] [Prev] [TOC]


Appendix B

Transferring Files to and from the BeOS


You can transfer files to and from the BeBox and a Macintosh or other computer in a number of ways: Over a network or serial cable with ftp; with a floppy disk using tar; or from the MacOS to a Be hard disk using the Be File System Tool.

Using ftp

You can use ftp, the "file transfer protocol" utility, to transfer files between a Macintosh (or any other computer that can run ftp) and the BeOS. To use ftp in the BeOS, you need to establish a connection with an Ethernet network (as described in "Network"), or connect a null modem cable between the computer running the BeOS and another computer.

ftp software is part of the BeOS, but you need to obtain ftp software for the Macintosh or other computer you want to exchange files with. There are a number of ftp packages available for the Macintosh. One good one, called Netpresenz (the successor to another good program, called FTPd), is available as "shareware" from a number of ftp and World Wide Web sites on the Internet. (Shareware is software you can download and try out for free, but if you decide to keep it, you pay a small fee to its author.) Netpresenz makes it possible to get files from a Macintosh using ftp on another computer. Another good shareware application is Anarchie. Anarchie makes it possible to get files from another computer that can host an ftp session. To find an Internet site where you can get a copy of Netpresenz and Anarchie, visit ftp.share.com/peterlewis (an ftp site) or http://www.share.com/peterlewis (a Web site).

You start ftp in the BeOS by double-clicking the Terminal application (in /apps) and in the window that opens, typing ftp followed by the IP address of the computer you want to connect to. If you have a DNS server on your network, or if you've set up a /system/hosts file, you can use the names and aliases in that file instead of the address:

If ftp can find the other computer on the network and establish a connection, ftp displays a message such as:

ftp then asks you to log in to the other computer:

Supply your name as you're known on the other computer and press Enter. ftp then asks for a password, if required:

The password you supply here is the one that you use on the other computer.

After the password is verified, you can transfer files between the two machines. To do this, you type ftp commands at the prompt.

The first command you should type is help:

This lists all the commands ftp recognizes. For more help on a specific command, type help command:

When examining the commands, keep in mind that the local computer is the one running the BeOS; the remote computer is the one on the other end of the Ethernet or serial cable.

Among the most commonly used commands are:

bin To transfer files in binary mode (required for the Macintosh)
cd To change directories on the remote machine
ls To list the contents of remote directories
get To retrieve a single file from the remote machine
mget To retrieve more than one file
put To transfer a file to the remote machine
mput To transfer more than one file
prompt To use mget or mput for many files, without approving each file
quit To end the ftp session

For example, to transfer the files MyApp and MyApp.xMAP from the Projects folder on the Macintosh to the MyAppProject directory on the BeBox:

Using suntar

If you have a Macintosh and BeBox but they aren't connected to an Ethernet network or with a null modem cable, you can use the tar utility to transfer files via floppy disk. tar is included with the BeOS, but you need to obtain a copy of suntar-the free Macintosh tar utility. You can download suntar from http://www.be.com (the Be Web site) or ftp.be.com/pub/OtherUtilities (on the Be ftp site).

In suntar, you can do everything you need to do using the commands in the Write menu:

  1. Choose "Create new tar archive" from suntar's Write menu.
  2. A dialog box prompts you to insert a disk.

  3. Choose the "Write data fork..." command (Macintosh resource forks are of no use in the BeOS). In the dialog box that appears, select the file you want to transfer and click Open. Or click Write Folder to write all the files in the current folder, or Write Selected Files to open a dialog box where you can select more than one file.
  4. You can choose "Write data fork..." as many times as necessary to put everything you want into the archive.

  5. Choose the "End of writing" command and quit suntar.
  6. The disk is ejected.

  7. In the BeOS, double-click Terminal (in /apps), insert the disk, and type:
  8. tar xv
    
    

    The files in the archive are copied to the BeOS.

Using the BeOS File System Tool

If you're running the BeOS on a Power Macintosh computer, you can use the BeOS File System Tool in the MacOS to transfer files to and from the MacOS and the BeOS. The BeOS File System Tool is in the Macintosh hard disk's BeOS Tools folder, which you copied from the BeOS CD-ROM as described in Installing the BeOS.

When you start the BeOS File System Tool, it opens a window where you type commands. You can use the Be File System Tool to copy files from the Macintosh disk to the BeOS disk, and vice versa. You can also use the tool to rename or delete files on the BeOS disk, to view the contents of directories on the disk, and to create and remove directories.

If you only have one BeOS disk (or disk with a BeOS partition), the BeOS File System tool assumes you want to transfer files to and from it. If you have more than one BeOS disk, you need to tell the BeOS File System Tool which one you want to work with.

Type use to see what disk the BeOS File System Tool is currently working with. Type disks to see a list of the BeOS disks available. To set the disk you want to work with, type use x y, where x is the bus number and y is the SCSI ID of the disk you want to work with (0 is the number of the bus that internal drives are typically connected to).

It's easiest to copy files from the Macintosh disk if they're in the same folder as the BeOS File System Tool itself. When referring to a file on the Macintosh disk, put a colon (:) in front of it. For example, to copy a file named file1 that's in the same folder as the BeOS File System Tool to the root folder on the BeOS disk, enter:

Enter help for details on the this and the other commands you can use with the BeOS File System Tool.

When you quit the BeOS File System, you're asked if you want to save the text in the window. Click save to save the text in a text file.


[Next] [Prev] [TOC]


BeOS User's Guide, DR8.2 for Power Mac Edition, 1/16/97.

Copyright © 1997, Be, Inc. All rights reserved.

Please send corrections, suggestions, and comments to userdocs@be.com.