FIT 100:  Fluency with Information Technology

Lab 2a:

Creating Directories and Navigating Directory Structures

(or, Where am I, where are my files, and how do I put my files somewhere else?)

Spring 2002

Local vs. Remote Directories:  “What’s the difference?” 2

Absolute versus Relative Paths 2

Navigate to and create a directory (folder) locally using Windows Explorer 3

Create a Directory remotely using SSH Secure File Transfer 6

Understanding the concepts covered in lab 2a: 7

Helpful links 9

 

 

Introduction:

 

For many of you this course is an introduction to a variety of new concepts, tools and technologies.  Labs for FIT 100 are designed to help you learn the use of these tools in a logical and structured fashion. 

 

Get into the habit of bringing a floppy disk or zip disk as an additional storage device for lab work.  What you learn in today’s lab will show you how to store documents in your remote account (Dante), but it doesn’t hurt to always have a back up.

 

What other reasons are there for using our remote accounts on Dante for storage instead of a relying solely on a floppy or zip disk?

 

·         A larger storage space for lab and project work (each student receives 100 MB of file space, a floppy disk is 2 MB)

·         You don’t have to carry around a disk or be physically located at a machine holding your work.  You can work at a different machine each time as long as you have an Internet connection and the SSH client.

·         Your floppy may be damaged carrying it in your backpack!!!!!!!

·         Backup!  A lifesaver if your computer dies….!

 

The computers in this lab are PC and run with a Windows Operating System (aka Microsoft!).  The tools used here are particular to that environment.  There is software available for Macs to do the same thing, but will not be a specific part of this lab. 

 

For today’s lab you should already have your email account up and running. 

Objectives:  Learning to transfer files

 

1.      To become comfortable with the concept of navigating directory structures to get to folders and files stored in different locations.

2.      To understand the concept of directory location and its impact on retrieval.

3.      To understand that there are many ways to access directories.  We will explore how to securely transfer files when located in UW campus labs using a secure file transfer protocol known as SSH Secure File Transfer.

4.      To create a folder (directory) on the local machine in a specific location.

5.      To create a folder (directory) on the remote machine (Dante) that is holding your user account using SSH.

6.      To move files (documents, etc) from a folder on the local machine to a folder inside of your Dante account and vice-versa

 

What you know:

 

 

Local vs. Remote Directories:  “What’s the difference?”

 

What is a directory?

 

A directory, or folder, is a container for files.  Just like the folders in an office file cabinet hold documents, a directory on your computer or any other, can hold files of all types.  A directory is a way to organize related files in a manner that allows for quick retrieval.  If you have your work divided into the various areas they pertain to, you can use folders to hold them in a logical manner. 

 

A directory can also be a collection of user accounts.  It is still a container holding related files.  You will make directories in this lab to hold your work this quarter, but you are also part of a directory of the users of email and web pages at the UW.

 

There are many ways to define a local directory.  For this lab, local directories are referred to as the folders that are located on the C drive on the PC physically in front of you.  Documents placed in folders at this location cannot be accessed at other campus computers.  They are local to the machine in front of you.   

 

Remote directories are folders stored on remote computers (called servers) that can be accessed from various computer labs on campus and even from home, if you have a way to connect. (See the UW Accounts or the bottom of the Pre-Lab Workshop for an illustration)




 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Absolute versus Relative Paths
when pointing (referring) to files or folders

 

A:\INFO100\MyFirstLab\myfile.txt

C:\My Documents\My Webs\images\

         

Consider the two lines just above.  Both are path names that refer to the location of a file or folder.  Now look at the two lines below.  They refer to the same file and folder above, but are considered relative path names.

 

          myfile.txt

          images\

 

It’s all LOCATION, LOCATION, LOCATION!!!

 

An absolute path name shows the exact path to the file.  Starting from the drive it is located on, right down to the name of the folder or file itself. It always gives the exact location. 

 

The second set of path names are known as relative path names.  They are named relative to the current folder. The name “myfile.txt” is only useful to me if it is a file name I am looking for within the current directory.  It would not be as helpful to someone just sitting down at the computer who didn’t know where to start looking.




 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


TO DO:

 

1.    Navigate to and create a directory (folder) locally using Windows Explorer

Windows Explorer is NOT Internet Explorer.  Windows Explorer is the program on the Windows operating system that allows the user to create directories and organize and search for files.

 

  1. Open Windows Explorer.  You can do this one of three ways (there are even more than that):

·         Press <Window key> + <e> key  [Your TA will demonstrate] OR

·         Move your mouse over the My Computer icon, right click and select Explore


OR

·         Go to Start>Programs>Windows Explorer

B.      Create a directory called EraseMe in this location:

C:\Documents\EraseMe\. 

If there is no Documents folder on the C Drive, go to My Documents.

You will first move to the C drive, then to the Documents folder.  Once there, go the file menu in the upper left of the screen.  From the options select New>Folder. Name your folder EraseMe.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


             

 

 

 

 

 

 

C.     Open Microsoft Word and create a new document called Lab2.doc (type in a few lines of text, then save).  Save Lab2.doc to the following location:

C:\Documents\EraseMe\Lab2.doc 

C is the top of the structure in this path, the root of the directory.

 

 

 

            You will need the file Lab2.doc in a few steps.

 

2.    Moving Files using Secure File Transfer (SFTP)

 

A simple way to move files over the Internet between local and remote directories is by using a secure File Transfer Protocol (SFTP).  

This lab will demonstrate the secure application used for transferring files at the UW.  It is called SSH Secure File Transfer.

 

  1. Open SSH Secure File Transfer (the location may vary from lab to lab, your TA will direct you)

    Make sure the profile name is dante.u.washington.edu:

 

  1. Enter your UserID (UW NetID) and click the connect button. 

 

  1. If you have not used SSH Secure File Transfer on this machine before, you will be asked if you want to store the public key in a database.  Simply click “Yes” and then enter your password on the next screen.  

 

 

When you have completed entering your password,

your home directory, known as the root directory,

on Dante will be displayed.

 

The left side of the interface displayed above shows:

 

The right side displays:

 

Explore the various features of the SSH Secure Shell interface.

 

 

3.    Create a Directory remotely using SSH Secure File Transfer

 

A.     Go to the Operation item of the menu bar up on top. 

·         Select New Folder and make a directory called FirstLab inside of your root directory
(HINT: you are placed in the root when you first enter your account, but make sure the root directory is highlighted.)

Your root, or home directory, is the top level of your account. 
You can always get there by clicking on the Home icon on the tool bar.

  1. When you finish, the new folder should appear on the left and right side.  Double click on the folder, and an empty screen will appear on the right side.  You are in the FirstLab directory.

 

  1. Use the Operation menu again and select the Upload option (or simply click on the up arrow).

  2. Navigate to find the document you created in step 3 above.  You should go to the C Drive to begin.

 

  1. Double click in the Documents folder and then on the EraseMe folder to find Lab2.doc.

 

  1. Double click on Lab2.doc to upload, OR click once and then click the Upload button. 
    A copy of Lab2.doc has now been sent to your Dante account and appears on the right.

 

G.     Using SSH Secure File Transfer, perform the following exercises: 

·         Rename the folder (directory) that you created in your remote account on Dante.  Change the name from FirstLab to fit100.

 

·         Transfer the Lab2.doc file from your renamed FIT100 folder to C:\ using the Operation menu.  This is not the same location as step 3.

·         Is it possible to open a file from the SSH window?

a.      It is possible to open a file from within the SSH window.  HOWEVER it is just a copy stored in a temporary folder on your local machine.  Any changes you make to the file will not be saved to the copy on your remote account. 

You should always download a copy of the file to a local folder that you decide upon.  Make changes, save it, then transfer (upload) it back to your Dante account.

4.    Understanding the concepts covered in lab 2a:

 

  1. Create folders in your remote account (Dante).  These folders will hold your future projects.  Place them inside your new fit100 folder for better organization for your class work:

·         Create 2 folders inside FIT100: Labs and Projects

·         Go into Projects and create 4 folders:

Project1

Project2

Project3

Use these folders to store copies of your projects as you work on them from different locations on campus.

 

B.      Exit SSH Secure Shell.

 

You now can create folders and move their contents between locations on the local machine and your remote account on Dante.  This is a very helpful resource when you need to be able to access and work on documents at a variety of locations but may not have a disk to transport the work. 

 

In the next portion of lab we will navigate through remote directory structures using a command line prompt rather than the Graphical User Interface. Become comfortable in the environment introduced in this portion of the lab and compare it to the command line environment you will use next.  It will save you headaches in the weeks to come.

 


Helpful links

 

Use the links provided here to obtain a copy of the secure FTP and secure Telnet clients if you do not already have them:

 

(UWICK)  UW Internet Connectivity Kit Information                                     

http://www.washington.edu/computing/software/uwick/  

 

Download UWICK kit if you have an Internet Connection:        

http://www.washington.edu/computing/software/uwick/starter/