Using USB memory sticks on the SunRays ....

John Shott shott at stanford.edu
Fri Nov 27 16:01:03 PST 2009


SNF Lab Members:

Rostam asked me how to transfer files to/from memory sticks on the 
SunRays.  I suspect that more than a few of you may be interested in 
that answer, so I will post it here.  It turns out that it is quite 
simple .... but only if you know where to look for the files.  In fact, 
we've added some features that should mount and show the files on your 
Memory Stick automatically.

First, login to the SunRay that you want to use .... before your insert 
your memory stick.

Second, insert your memory stick into one of the 4 USB slots in the back 
of the SunRay.  This is actually the trickiest part as there are 4 
closely spaced USB slots and two of them are in use with the keyboard 
and mouse.

Depending on the size of the memory stick (the SunRays only have a USB 
1.1 connection, I think ....) you will soon see a File Browser window 
open that contains the contents of your USB device.  If you have a 
high-capacity memory stick, this may take a minute or two .... and the 
LED on your memory stick will likely be flashing as it figures out what 
is already on that device. In the top bar of the File Browser you will 
also see the name of the directory in which those files are mounted.  
That will be something like: 
/tmp/SUNWut/mnt/${user_name}/${memory_stick_name}.  In other words, if 
your login name is johndoe and the name of your memory stick is 
MyFlashDrive, then all of your files will be visible in the directory
/tmp/SUNWut/mnt/johndoe/MyFlashDrive.  If you have not actually given 
your flash drive a name, it will appear in the directory named "noname" 
.... in other words /tmp/SUNWut/mnt/johndoe/noname.

You can either use the GUI-based File Browser to copy files from your 
memory stick to some where in your home directory or can also copy files 
from your home directory to your memory stick.

Of course, you can also open up a command window and use the Unix copy 
command to copy files to/from your memory stick.

For example, to copy a file named MyFile.txt from your home directory to 
your memory stick named MyFlashDrive you could issue the command:

cp ~/MyFile.txt /tmp/SUNWut/mnt/${user_name}/MyFlashDrive

where, of course, ${user_name} is replaced by your login name.

Alternatively, one way to copy a file named SomeOtherFile.txt from your 
flash drive named AnotherThumbDrive to your home directory would be to 
issue the command:

cp /tmp/SUNWut/mnt/${user_name}/AnotherThumbDrive/SomeOtherFile.txt ~

If you are unfamiliar with Unix, the tilde character "~" is an alias for 
"my home directory".  So, ~/SomeDirectory/SomeFile.txt is a way of 
naming the file SomeFile.txt that is in the directory named 
SomeDirectory in your home directory.

In any event, I'm hopeful that you'll find this improved access to 
moving files onto or off of the SunRays with a USB.

Note: when you are done with your USB memory stick, you simply have to 
remove it.

Remember, if you have a big memory stick and it is quite full, it will 
take a while for this to open up on your desktop because the peak read 
rate of USB 1.1 is only 12 Mb/second (which is 1.5 MB/second) using the 
standard conventions of Mb = mega-bit and MB = mega-byte.

Let me know if you have any questions or problems,

John






More information about the labmembers mailing list