04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4 You can also make a new directory on the server<br />

<strong>with</strong> the “mkdir” command.<br />

starbuzz<br />

5 You can retrieve files too, <strong>with</strong> the “get” command.<br />

starbuzz<br />

File Edit Window Help Jam<br />

%ftp www.starbuzzcoffee.com<br />

Connected to www.starbuzzcoffee.com<br />

Name: headfirst<br />

Password:******<br />

230 User headfirst logged in.<br />

ftp> dir<br />

drwx------ 4096 Sep 5 15:07 starbuzz<br />

ftp> cd starbuzz<br />

CWD command successful<br />

ftp> put index.html<br />

Transfer complete.<br />

ftp> dir<br />

-rw------- 1022 Sep 5 15:07 index.html<br />

ftp> mkdir images<br />

Directory successfully created<br />

ftp> cd images<br />

CWD command successful<br />

ftp> bye<br />

index.html<br />

mission.html<br />

index.html<br />

mission.html<br />

mkdir images<br />

get index.html<br />

<br />

.<br />

.<br />

.<br />

<br />

index.html<br />

Let’s put all that together. Here’s an example of<br />

FTP being used from a command-line application:<br />

Change to the<br />

starbuzz directory.<br />

www.starbuzzcoffee.com<br />

www.starbuzzcoffee.com<br />

Connect and login.<br />

Get a directory of<br />

what is there. One<br />

directory<br />

called<br />

starbuzz.<br />

Transfer index.html<br />

there.<br />

Look at the<br />

directory, there’s<br />

index.html.<br />

Make a directory for images, and<br />

then quit using the bye command<br />

FTP commands<br />

getting connected<br />

A Web Detour<br />

This is just like making a new folder, only you’re<br />

doing it on the server, not your own computer.<br />

starbuzz<br />

images<br />

starbuzz<br />

images<br />

<br />

.<br />

.<br />

.<br />

<br />

index.html<br />

<br />

.<br />

.<br />

.<br />

<br />

index.html<br />

Most FTP applications come <strong>with</strong> much friendlier<br />

graphical interfaces, so feel free to skip right<br />

over this if you’re using one of those.<br />

Creates a new<br />

directory called<br />

“images”, inside the<br />

starbuzz directory<br />

on the server.<br />

Transfers a copy of the<br />

file from the server<br />

back to your computer.<br />

Whether you’re typing in FTP commands<br />

on the command-line, or using an FTP<br />

application <strong>with</strong> a graphical interface, the<br />

commands or operations you can perform<br />

are pretty much the same.<br />

dir: get a listing of the current directory.<br />

cd: change to another directory. “..”<br />

means up one directory here, too.<br />

pwd: display the current directory you’re<br />

in.<br />

put : transfers the specified<br />

filename to the server.<br />

get : retrieves the specified<br />

filename from the server, back to your<br />

computer.<br />

you are here 133

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!