- Goals
- to introduce users with our Calclab systems
to give them starting info on UNIX commands
Logging In
- Usernames
- 3 initials, last four digits of SID#: abc1234
- Passwords
- good PW = random =~ 1st letters of each word in a phrase or lyric
- bad PW = predictable =~ name, birthdate, pet names, dictionary
word, etc.
- UIDs & GIDs
- UID = unique number to identify each user.
- GID = group ID number to identify groups of users, protections, etc.
The Calclab Environment
After logging in, 3 windows appear: a clock, Maple and an icon labeled Pine.
- Managing Email - pine - automatically started when you log in
- Symbolic Math Software - Maple - also automatically started
Window manager behavior: top left and two top right window buttons:
- Top Left: window menu, for basic operations
- Small Top Right: Iconizes window
- Large Top Right: Window Maximize Toggle (press again to restore size)
Double Clicking on ....
- a window ICON restores that window to normal size.
- the Top Left window button KILLs the program and closes the window.
Other programs and utilities are available from the background menus;
shell windows (terminal windows), Pine, Netscape, etc are started by
selecting them from the menus.
UNIX files and directories
Files on UNIX are stored hierarchically in directories. Directories
may contain files and other directories (subdirectories); files contain
only data you create and save. Directories are solely for organization.
- File & Directory management
- Making files & directories: touch and mkdir
(mkdir ~/public_html)
- Moving files & directories: mv
- Copying files & directories: cp
(cp ~brentb/classnotes.html ~/public_html)
- Removing (deleting) files/dirs: rm and rmdir
- File & Directory Permissions
- View permissions with ls -l
- -rwx------ format
- X means execute for files, but means searchable for directories.
- Changing file and directory permissions: chmod
(chmod go+x ~ ~/public_html)
(chmod a+r ~/public_html/classnotes.html)
- Special Directories and changing directories
- Home directory = $HOME or ~
- Dot and DotDot: . is current directory, .. is parent directory.
- Change Directory: cd
Common UNIX tools
- asedit - a straight-forward text editor.
- netscape - a web browser
- Locating other users on the system
- finger username OR finger lastname - basic
information about user
- finduser username - more detailed account information
including disk usage.
- telnet - allows you to login to a remote machine.
- ftp - File Transfer Program - transfer files between machines.
- more filename - display a text file to the terminal window
- man command - displays the manual page for command.
- quota -v - display your current disk usage
UNIX Shell Tips I
- Directory Navigation Shortcuts
- Change Directory: cd
- ~ and ~username
- Directory Stack Commands
- Name Completion (ESC, ^D)
- Type initial letters, then ESC. Name is completed else or else
there are duplicates.
- Type control-D after initial letters to view duplicate matches.
- Shell History
- Remembers the N last commands (presently set to 30)
- Show command history: history
- Special character: !
- !! means the absolute last command
- !27 means the 27th command issued (see history)
- !-2 means the second previous command
- !ls means the last command starting with 'ls'
UNIX Shell Tips II
- File Globbing or, tips for the lazy typist
Files can be matched by "regular expressions", also loosely known
as "wildcards."
- * - matches any sequence in a filename, of any length.
- ? - matches any single character in a filename.
- [] - matches a set of characters; [A-Z] matches uppercase letters.
- I/O Redirection with <, >, >>
- < - redirects input from a file: cat <file
- > - redirects output into a file: cat file >outfile
- >> - appends output to a file: cat file >>outfile
- Other Special Shell Characters
- {} - expansion - file.{dvi,ps,log} = "file.dvi file.ps
file.log"
- ^^ - substitution
- & - background execution - `cmd &' runs `cmd' in the
background, which immediately returns the shell prompt. Will not
work for commands that need user input, like pine, etc.