Transferring files between Remote and Math/CS Linux System
You can transfer files between your machine and the Math/CS Linux lab
machines. This is especially useful if you are running Linux software remotely: you can
edit files on your machine, transfer the file to the Linux system, run
the Linux software, and possibly transfer results back to your system
for further processing or editing.
To perform such transfers, you need to first
download some free software that will allow you to connect securely to
the Math/CS lab servers. (A secure connection means that the
information passed between your computer and the Math/CS computers is
encrypted.) I suggest using a program called "psftp", which is
available at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
(If you are running Windows, the specific file you want is http://the.earth.li/~sgtatham/putty/latest/x86/psftp.exe).
Simply download this file to your desktop.
Once you have psftp, double-click the psftp.exe shortcut to start the
program. In the window that appears,
you will see the message
psftp: no hostname specified; use
"open host.name" to connect
psftp>
Following the prompt (psftp>),
enter
open server3.mathcs.duq.edu
and press enter. After a brief pause, you should see a login
prompt. Enter your Math/CS
user name (the one you use to log in to Math/CS lab computers) and
press Enter. When prompted for your password, enter your Math/CS
password.
Before transferring files, you need to be in the appropriate folder
(directory) on both your machine and on the Math/CS server
machine. You are initially in your Desktop folder on your machine
and in your home directory on the Linux machine. You use the cd command to change
directories on the Linux side, just as you would if you were using a shell window. You use a
command named lcd (local
change directory) to change directories on the Windows side. The lcd command is exactly like
the cd command except
for its name and except for which machine the change happens on.
For example, to move into your public_html directory in Linux and into
a folder called CS within a folder called papers that is on your
Desktop, you would enter the commands
cd public_html
lcd papers/CS
Notice that the forward slash /
is always used to separate folders in psftp, regardless of whether the
system on which the folders reside is Linux or Windows.
Once you're in the right directories, you move a file from your machine
to the Linux server by using the put
command and from Linux to your machine by using the get command. For example,
if we wanted to move a file named status_report.tex from our machine to
the Linux system, we would enter
put status_report.tex
Important note: if you want to
transfer a non-text file (such as an image) rather than a text file,
then you must issue the command
bin
(short for binary) before performing the transfer. To switch back
to the default text mode, issue the command
asc
(short for ASCII).
When you're done using psftp, enter bye.