bw logo

Appendix C. Copying files to Linux

For people unfamiliar with using Linux, even a simple task such as copying files from a Windows machine to a Linux machine can be daunting. This section aims to assist this process by providing a number of (hopefully) convenient alternatives that can be used to assist in transferring files between machines.

There a number of approaches that can be used for copying files from Windows to Linux. These include but are not limited to:

  • USB Thumb Drive / External Hard Disk

  • Python SimpleHTTPServer hosted on Windows

  • Windows network share

Below is a brief outline of each of the mentioned methods. We encourage you to investigate each approach independently in order to feel comfortable performing these operations whenever required without assistance from BigWorld.

The following examples will assume you are copying the RPM files from a standard BigWorld package which are located in the rpm directory at the top level of your package.

It doesn't matter where you copy the files on the Linux machine. However, the commands listed in the Simple Installation section are given under the assumption that you copy the files to /root.

Note

In Linux the entire file system is organised in a single hierarchy. The location / refers to the root level and subdirectories are listed after that. For example, to switch to the /usr/include directory, you can use the cd, or 'change directory' command in the following way:

$ cd /usr/include

If you are new to Linux, you should read the article at www.freeos.com/articles/3102, which describes the Linux file system in more detail.

C.1. USB Thumb Drive / External Hard Disk

When using this approach you may need to pay attention to the filesystem type of the drive you are using. A FAT32 filesystem is natively supported by Linux, while NTFS is not. Quite often, drives that have been formatted under Windows will have an NTFS filesystem rather than FAT32. If this occurs in your drive, see Installing NTFS Support.

This approach is perhaps the easiest for copying a small number of files between machines on a once-off basis. Once you have copied the files from your Windows machine to the USB device and inserted it into the Linux machine the device should be auto-mounted. If you are logged into a graphical account you should see the device appear as a new icon on your desktop.

Command line only users may need to perform more steps to discover where the device was mounted. The mount command should provide you with a list of all device-to-directory mappings to enable you to discover the directory in which the files are located.

C.1.1. Installing NTFS Support

To install NTFS support for your CentOS installation, firstly ensure that you have installed the EPEL repository as outlined in Installing the EPEL Repository and then run the following command as root:

# yum install ntfs-3g ntfsprogs

C.2. Python SimpleHTTPServer hosted on Windows

This approach assumes that you have installed Python on your Windows machine and have the Python executables in your $PATH environment variable.

After installing or downloading your Bigworld Technology package, open a command line window by clicking on Run in the Start menu, and typing cmd into the prompt. Navigate to the rpm directory in your new installation and type:

C:\BigWorld\rpm> python.exe -m SimpleHTTPServer
rving HTTP on 0.0.0.0 port 8000 ...

You can now use the wget program or a Web browser on your Linux machine to copy files via HTTP. If you are unsure of your Windows machine IP address you can use the ipconfig program on the command line. For example, to copy the 2.1 bwmachined RPM file you would use the following command, replacing 10.40.3.145 with your own IP address:

$ wget http://10.40.3.145:8000/bigworld-bwmachined-2.1.0.x86_64.rpm

--2011-11-05 11:16:28--  http://10.40.3.145:8000/bigworld-bwmachined-2.1.0.x86_64.rpm
Connecting to 10.40.3.145:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1096149 (1.0M) [application/octet-stream]
Saving to: `bigworld-bwmachined-2.1.0.x86_64.rpm'

100%[======================================>] 1,096,149   4.93M/s   in 0.3s    

2011-11-05 11:16:29 (11.8 MB/s) - `bigworld-bwmachined-2.1.0.x86_64.rpm' saved [1096149/1096149]

C.3. Windows network share

Copying files from a Windows network share can be extremely convenient, but depending on your network setup it may be problematic to initially setup. In order to use this file-copying mechanism, ensure that you share your windows files using Advanced network file sharing, not the default simple file sharing. More detailed instructions on configuring a network share on Windows can be found in the Server Programming Guide's chapter Shared Development Environments.

For simplicity's sake, to retrieve the files on the Linux machine you should use a graphical login and navigate to your Windows machine using the PlacesNetwork Servers menu options.