# File Transferring

# Linux/Mac

Sending files to/from UNLV CS Servers can be done with the scp command.

# Sending a file to a server

  1. Open a terminal.
  2. Navigate to the file's directory.
  3. Enter the command scp using the following format...
    • scp filename rebelmail@[server].cs.unlv.edu:~/<entire working directory to the destination folder>/filename
    • Eg. scp test.cpp johnDoe5@sally.cs.unlv.edu:~/Documents/cs135/assignment1/test.cpp
    • For multiple files or a directory, use scp -r directory rebelmail@[server].cs.unlv.edu:~/[destination directory]
  4. Press enter and enter your password when prompted.
  5. If successful, the file should be on the server in the directory specified.

# Retrieving a file from a server

  1. Open a terminal.
  2. Navigate to the destination folder.
  3. Enter the command scp using the following format...
    • scp rebelmail@[server].cs.unlv.edu:~/<entire working directory to the destination folder>/filename filename
    • Eg. scp johnDoe5@sally.cs.unlv.edu:~/Documents/cs135/assignment1/test.cpp test.cpp
  4. Press enter and enter your password when prompted.
  5. If successful, the file should be in your destination folder.

# Windows

It is recommended by us to use WinSCP (opens new window) for transferring files to/from Windows and the remote servers. Some SSH clients (Bitvise, MobaXTerm) have a file transfer utility built in.

# FileZilla

FileZilla is a File Transfer Protocol (FTP) client. You can use FileZilla to quickly transfer files between your computer and the UNLV Servers with a simple drag-and-drop interface.

# Installation

It can be downloaded here (opens new window). After finishing the download, run the FileZilla .exe file. You should be greeted with with a terms of service. Hit Next. If you are offered an ad after this, I recommend unchecking the box before hitting Next. FileZilla will now install. Click "finish" when the installation is done.

# Connecting to a Server

To transfer files, you will need to connect to a server. To access your UNLV files, you can connect to any server. For this example, we will be using Sally.

  1. Go to the top bar. In the Host box, type in sally.cs.unlv.edu.
  2. In the Username box, type in your UNLV Computer Science account name.
  3. Type the password for your CS account into the Password box.
  4. Enter 22 into the Port box. Ports 20-22 are the default for FTP. Sometimes FileZilla can connect if you leave the box empty, however it is inconsistent.
  5. Hit Quickconnect to connect to the server. FileZilla will take a moment to connect. If it is successful, you should see the files for the server you connected to on the right.

# Using Filezilla

# Transferring Files

Transferring files with FileZilla is relatively simple. Just navigate to the file you wish to transfer, and drag it from the side you are transferring it from to the side you wish to transfer it to. Each side can be navigated like a file system. The left side is your local computer and the right side is the server that you are connected to.

# Adding Bookmarks

If you are in a directory frequently, you can bookmark it for later to quickly jump back to the directory.

  1. Go to Bookmarks > Manage Bookmarks
  2. If you'd like to create a new bookmark, select New Bookmark
  3. You should see a box labeled "local directory". By clicking browse, you can select a directory on the computer you are using to connect. The "remote directory" box will not actually bookmark a location on the remote machine. Instead, it will only jump there when first connecting to the server. Hit "ok" when you are done adding bookmarks.

# Searching for Remote Files

To search for a file or multiple files in a directory, you can use the search function. To do this, use the button that looks like binoculars at the top of the window. This should open a new window for searching. Here, you can set how you want to search.

  1. First, you can set whether to search the local or remote machine.
  2. Next, there is a box specifying which directory to search. The search feature will search this directory and all folders located "inside" of it.
  3. Next, there will be a drop down menu letting you choose whether you want all or any of the conditions to be met.
  4. Lastly, you can enter in your actual search conditions. There will be drop down menus here to allow you to search for a name, date, path, or size of a file. You can then choose whether the file should contain this information or not with the next dropdown. This feature also allows for you to search for regular expressions, similar to grep. After these dropdowns have been selected, type in what you would like to search. To add more conditions, use the plus button on the right. To remove, use the minus button on the condition you'd like to remove.
  5. When you are ready to search, click the search button in the top right. The list at the bottom of the window will start to populate with files that match your search. This will display the filename alongside some metadata, including permissions and location. By right clicking a file, you can choose to edit, download, or delete the file.

# WinSCP

WinSCP is a graphical client for Windows that allows file transfer with SFTP and SCP protocols.

# Installation

  • Visit here (opens new window) to download the latest WinSCP Version
  • If you have installed PuTTY and have saved sessions you can automatically import them

# Adding a Server

  • After running WinSCP click on New Site
  • Enter the following information:
    • File protocol: choose SFTP or SCP
    • Host name: enter sally.cs.unlv.edu
    • Username: your username
    • Password: your password
  • Click Save
  • You may click Save password (not reccomended) if you are using a private computer

# Using WinSCP

  • After you have launched WinSCP, double click one of your saved sessions to start it
  • The left pane shows your local file system and the right pane shows the remote file system
  • You can drag & drop files to/from either pane and within Windows Explorer