Felitaur Site
Offerings
|
   
|
UNIX/VI Cheat Sheet for FC4
For more detailed information, check out the UNIX/PICO Web Page Creation Help pages.
- Use an SSH (Secure Shell Client) to connect to fc4 (our web server)
- Use Putty, an encrypted Telnet like connection we have at MCC
- Click on the "start" button
- Go to "Programs"
- Go to "Putty"
- Go to "Putty" and click on it
- In the window that opens...
- For host type lampbusters.com (depending on your setup)
- OR: Go to my internet page and
scroll down under "Web page resources" and find the link to download
putty. When you go to the putty (TM) site, click on downloads, and choose
the top one (putty.exe) and download it. All you have to do is save a
shortcut on your desktop to it, or you can run it off a USB drive by:
- Double click on "my Computer"
- Double click on the "Removable Drive E:" icon
- Double Click on the "putty.exe icon"
- Follow the above directions
- EVERYTHING FROM HERE ON DOWN IS THE SAME FOR ALL METHODS
- login: Type your username here (Note: I used the SAME username
that you created when you made your netscape email account. If you haven't
made your netscape email account, go to http://www.mc.maricopa.edu and click
on the "Create New Account" link on the left hand side menu
- password: Type your password here (note, NOTHING shows on screen when you
type, also, you only get 1 minute to log on to the machine before it
disconnects, and 3 bad tries locks you out for 2 minutes)
- A command prompt shows up, [username@hammy ~]
- ******Type cd public_html and hit "enter" (this changes you into your
web
directory, VERY important, make SURE you do this, use pwd "enter"
to make sure what
directory you are working in to avoid errors)
- Type ls (for "list stuff") You should see your files listed.
- To change Passwrd! just type passwd and hit enter at the prompt.
- To edit a file, we'll use vi a powerful text editor, but a bit tricky
to learn at first. So you type
- vi filename.html (obviously, don't call it FILENAME, just put YOUR filename there)
- This will open an existing file, or create a new one if it's not there
- IMPORTANT vi has two modes, command and edit, and you need to make sure you are in the right mode
- if you type "i" for insert, you enter edit mode, and the [esc] key will put you back into command mode
- EDIT MODE(by typing i or a)
- You can use the arrow keys to move around (and page up and down)
- The backspace key works to delete characters
- If you copy something, then right click the mouse button, it will paste where the cursor is presently located
- COMMAND MODE (by hitting the [esc] key)
- :w (saves file :w filename to save to a particular name)
- :wq (save and quit)
- :q! (quit without saving)
- dd (deletes a line, 5dd deletes the line you are on, and 4 below it)
- yy (copies a line, 5yy copies 5 lines)
- p (pastes a line at the cursor)
- /searchword (searchs for "searchword")
-
Copying your template file
- You can at the command line (bash-3.0$) just do the following:
cp template.html newfilename.html (Again, use the name you want, not
"newfilename")
-
Basic Instructions
- After you have connected to lampbusters.com and logged in and done the cd public_html
- then type vi filename.html
- (If you want to use your template, go vi template.html and then
:w newfilename.html and hit :q to exit vi, then vi newfilename.html
- MAIN STEPS
- Type "i" for insert mode, and start typing
- Hit [esc] then :w
- Then click the "refresh/reload" button on your web browser to view your changes
- Then use the taskbar to switch back to putty
- Type "i" for insert mode, start typing
- Rinse, repeat, enjoy. ;)
- Some Vi Help links located at the bottom of the page
- For some of the validation tags you need to copy, check out the Basic XHTML link.
- TO SEE YOUR WORK: Your web addres is
http://www.mc.maricopa.edu/~username/ OR http://lampbusters.com/~username/
(or www.mc.maricopa.edu/~username)
(where username is YOUR
username)and if your filename isn't index.html, you need to type that
after the last / (such as http://fc4.mc.maricopa.edu/~username/resume.html)
- ADVICE: Have your web page file open in Putty and the
same page displayed in
your web browers, make changes, then save,
then immediately
switch to your browser and hit "reload". A very powerful way to learn HTML, as
you can see the results on a real web site immediately.
- PRINTING YOUR SOURCE! Just use the command "lpr filename"
where filename is the name of your file. Make sure you are at a command
line. This ONLY prints to BA1W
- Remember, to use pictures, you must use a ftp program such as Filezilla(helpfile) (file transfer protocol) to move them
into the right directory.
|
|