meets Tuesday and Thursday from 0800-0915
office hours in Manning 112
Class Schedule
10 Jan | intro
15 Jan | clients
17 Jan |
servers |
command line |
create protected directory |
next session
22 Jan | networks
24 Jan | basics lab
29 Jan | structural layer
31 Jan | presentational layer
05 Feb | working with layers
07 Feb | behavior layer
12 Feb | images & design
14 Feb | website lab
19 Feb | document markup
21 Feb | tools that read markup
26 Feb | document markup lab
28 Feb | spreadsheets
05 Mar | formulas & functions
07 Mar | data display
19 Mar | database tools
21 Mar | spreadsheets lab
26 Mar | relational databases
28 Mar | tables
02 Apr | relationships
04 Apr | input & output
09 Apr | SQL
11 Apr | complex queries
16 Apr | databases lab
18 Apr | presentation design
23 Apr | presentation delivery
25 Apr | presentation lab
30 Apr | 0800-1100 | final in class presentation
This work
is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
home & schedule | class blog | syllabus | contact | grades
Normally, one can work within the Shell of the server operating system
by using a command line interface.
Servers may be using either UNIX or LINUX, but the commands for both operating systems are essentially the same. So, if we learn the commands and behaviors for one, we probably can work easily on the other as well. For the rest of this page, where the word UNIX is used, you can substitute LINUX as well.
A little knowledge is a dangerous thing. This is especially true of UNIX. In UNIX it is possible to erase every one of your files with one little command and never get an "Are you sure?" message or warning.
Ask me.
I've done it.
And while I've done it to my own files, some network managers have done it to every user's files.
For Windows machines, SILS uses a terminal client program called "SSH", but you can use other compatible clients.
SSH uses ssh (the Secure Shell) to login, so that your username and password are not visible to other people on the campus network.
For Macintosh machines, you will be using an SSH client that comes with every Apple computer (although you might not have known about it).
SSH uses ssh (the Secure Shell) to login, so that your username and password are not visible to other people on the campus network.
This would be a good time to get used to a convention.
commandsargumentvalue
Working with Unix/Linux at the command line requires us to know certain exact
commands.
But we also want to become comfortable with the fact that some commands require an
argument
to effectively carry out the command.
Sometimes the argument will include a specific
value that must be appended to the
argument in order to carry out the
command.
We will have to get used to this syntax as it will be a common theme in all the tools we will encounter.
If you want reference sheet for Unix/Linux commands, you may use and save this one.
As you move around among your files and directories, you may become disoriented as to "where" you are. UNIX has the concept of "current" directory, also known as the working directory, or the directory you are currently "in". Two additional commands will be useful to determine what directory you are in.
to find yourself, use the
pwd
print working directory command
pwd doesn't take any arguments
to move between directories, use the
cd
change directory command
cd takes the destination directory as its single argument.
Try this: cd public_html then ls or pwd
Do you see that you changed to a new directory?
Type cd to return home.
More on ls (that's "ell ess"):
ls -l gives a long directory listing, including the file size, creation date, and access permissions
ls -s gives the size (in blocks) of a file
ls -a shows all files.
Otherwise, files starting with a dot (.) are skipped.
Your current directory is always abbreviated as .,
and the parent directory is always abbreviated as ..
You can put more than one argument on the ls command, as in ls -als
There are several commands that you will use to create directories and files.
These are (again) command line commands. They all have options, and they all take one or more arguments. In UNIX parlance, an argument is a file or directory name, or some other piece of information needed to complete the command.
We will look at the arguments.
To create a directory, type the make directory command mkdir
followed by the name you want the directory to have. This looks like:
mkdir mynewdir
In this case, mynewdir is the argument for the mkdir command.
Removing a directory is similar; the argument is the name of the directory you want to remove. Try it.
rm for removing a file takes one argument, the name of the file.
The remaining two commands, cp
and mv,
each take two arguments.
In the copy command,
the first argument is the name of the file you wish to move or copy,
the second argument is the name of the file you want to copy into or move the file to.
cp mynewfile mynewfile1
makes a copy of the file named mynewfile and names it mynewfile1
The move command is essentially a rename command.
The arguments are not limited to file and directory names in the local directory. An argument can specify another directory and a file in that directory. For instance, if you have a directory called public_html (which you should), then you can move a file from your home directory into this directory as follows.
mv thisfile public_html/
If in addition to moving the file, you want to rename it,
then the new file name can be typed following the slash, as follows:
mv thisfile public_html/thatfile
Pico is a simple text editor that allows you to edit text documents. Pico is not a word processor, as word processors allow you to format objects like text, tables, and paragraph types whereas text editors only allow one object - text.
To invoke Pico, just type pico at the command line and you will be "in" the editor.
The editor commands are found at the bottom of the screen. In addition to pico, there are two other text editors, vi and emacs, available for your use. If you are already using vi or emacs, continue to use them, but pico is probably the simplest to learn to use because of the command listing at the bottom.
Use pico to create a file in your home directory that contains your name, some facts, and information about yourself.
These are commands commonly used. You will find them valuable when you edit your Web pages on the UNIX system, and for other UNIX tasks as well. Remember:
Commands can have arguments and options. Options usually have a hyphen.
Most common errors in UNIX come from not knowing what directory you are in. Use the pwd and ls commands to keep track.
Use the man command to get usage information