We recommend using the FTP client FileZilla. (You can also login using a program such as SecureCRT to log on remotely to eniac and transfer files via the command line.)
eniac-l.seas.upenn.eduas the host (the letter L for linux, not the number 1). Select
SFTP using SSH2as the servertype (which means "secure file transfer protocol" and "secure shell"). Choose
Normalas the logon type. Type your eniac username in the user field. Rename this site something useful like "eniac-l"
.dmgto mount the disk image, if your browser (we recommend Safari) doesn't automatically open safe downloads; then copy the Fugu application to your computer's Applications folder.
First log on to eniac (directions can be found here). Then use scp (enter username/password for each copy command), sftp (enter username once and issue multiple transfer commands), or rsync.
Note: in the following examples, replace
myname with your eniac username.
scp is easy. It has sytnax similar to that of the unix
cp command (
cp from to), along with additional user/host information. After entering an
scp command, you will be prompted to enter your password before the command is completed. For detailed info, see the
scp man page, available online or by typing "
man scp" at a shell prompt. The examples below are a short cheat sheet.
localfilefrom the local current directory to the
htmldirectory in your eniac account's home directory:
$ scp localfile email@example.com:html/
remotefilefrom the progs directory in your eniac account to your current directory on your computer. Note that the second argument is a dot "." which means current directory.
$ scp firstname.lastname@example.org:progs/remotefile .
/usr/local/bin/directory on eniac — assuming you have the required permissions.
$ scp localfile email@example.com:/usr/local/bin/
120/homework/directory (and recursively all it contents) into the remote
$ scp -r 120/homework/ firstname.lastname@example.org:cse120/
NOTE: Depending on your version of tar, "tar -cvfz" may work, which compresses the archive. In this case it would create a file called myArchive.tar.zip.
$ tar -cvf myArchive.tar cse1xx/homework
$ gzip myArchive.tar // if gzip doesn't work, try zip. Still no luck? google and download gzip.
$ scp -r myArchive.tar.zip email@example.com:cse1xx/
$ gunzip myArchive.tar.zip // or unzip
$ tar -xvf myArchive.tar
sftp firstname.lastname@example.org "username" is your username. Hit enter, and enter your password when prompted (nothing will appear on your screen as you type — as with most *nix password prompts, SFTP's doesn't echo).
man sftp). An example session follows.
$ sftp email@example.com Connecting to eniac-l.seas.upenn.edu... The authenticity of host 'eniac-l.seas.upenn.edu (188.8.131.52)' can't be established. RSA key fingerprint is bf:b1:e4:01:4c:d3:69:e2:83:8b:8d:f9:b7:06:a3:a9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'eniac-l.seas.upenn.edu' (RSA) to the list of known hosts. firstname.lastname@example.org's password:
From the Unix command line, the
sftp command opens a connection; here, the username is
mfickett (use yours instaed), and the server is
eniac-l.seas.upenn.edu, which will be the same for you, connecting to Eniac.
sftp> ls . .. .Favorites .mozilla .muttrc .plan .profile .project .ssh Desktop Filezilla.htm Mail Sites botworld2005Aug26.tar.gz date.sh fluidballs.jar html mail
ls command lists the contents of the current directory (on the server). As with the normal command, it can be used as
ls -l to provide a more detailed listing, including ownership, permissions, and modification times.
sftp> lcd Desktop/ sftp> lls speakerstmp.txt
lls commands are like their usual counterparts —
cd for changing directory,
ls for listing — except that they act on the local side (your computer).
sftp> cd html sftp> ls . .. main.css strstream.h useoldio.h sftp> mget *.h Fetching /mnt/castor/seas_home/m/mfickett/html/strstream.h to strstream.h /mnt/castor/seas_home/m/mfickett/html/strstre 100% 3207 3.1KB/s 00:00 Fetching /mnt/castor/seas_home/m/mfickett/html/useoldio.h to useoldio.h /mnt/castor/seas_home/m/mfickett/html/useoldi 100% 1036 1.0KB/s 00:00
get command gets a single file, whose name must be specified exactly; the
mget gets multiple files, and the filenames can be specified with wildcards; here,
* (star or asterisk) matches anything (so
anything.h will match. Any files matched on the remote side (the server) are copied to the local side, into the local working directory.
sftp> put speakerstmp.txt Uploading speakerstmp.txt to /mnt/castor/seas_home/m/mfickett/html/speakerstmp.txt speakerstmp.txt 100% 718 0.7KB/s 00:00
mput commands work much like
mget, except that they copy files from your computer (local) to the server (remote).
sftp> ls . .. main.css speakerstmp.txt strstream.h useoldio.h sftp> rm speakerstmp.txt Removing /mnt/castor/seas_home/m/mfickett/html/speakerstmp.txt
rm removes a file on the remote side.
To close the session, type control-d, or enter
Other useful commands include:
mkdir name— make a new directory named name on the remote side
rmdir name— remve the directory named name on the remote side
!command args— execute the given command on the remote side with the given arguments. For example,
!vi file.txtwill allow you to edit a file without closing your sftp session or opening a new local shell
For synchronizing directories (or larger groups of files), you may want to look up rsync. A typical execution I would use is this:
rsync -rlptv --delete ~/Documents/school/upenn/java120/ email@example.com:/home1/m1/mfickett/cse120/
This would make my Eniac
cse120/ directory look like the
java120/ directory on my computer. The options used are as follows:
-r— recursive; copy entire directories
-l— preserve links as links
-p— preserve permissions
-t— preserve modification times
-v— verbose; say what's going on
--delete— if a file exists locally (my computer) but not remotely (the server; Eniac), delete it from the server
-n— not used in this example, the
-nflag does a dry run: no files are modified, but all the information is printed out, so you can see if
rsyncis doing what you want.
As with most command-line usage, be careful; run rsync with the
-v flags the first time, especially if you're using
--delete. I recommend looking at the rsync examples section.