Download presentation
Presentation is loading. Please wait.
1
CSCI 243: C & UNIX Kirk Anne South 124A kma@geneseo.edu
2
Man Pages The “window’ to the UNIX world On-line documentation available Difficult at first, useful later
3
Basic “man page” Format NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES ENVIRONMENT SEE ALSO
4
“man page” sections Section 1 - User Commands Section 2 - System Calls Section 3 - Library Calls Section 4 - File Formats Section 5 - Headers, Macros Section 6 - Games/Demos Section 7 - Devices Section 8 - System Management Commands
5
Using “man” man chown man -s 2 chown or man 2 chown man -k owner
6
Editors Oh so many choices, so little time… –ed (worse than the cartoon) –vi (Not “vye”, it’s vee-eye [check the manual]) –emacs (Everything AND the kitchen sink) –pico (the easy way out)
7
Why “vi”? It’s on every UNIX system. If you do system adminstration, you will want to learn it. “Moded” editor After you learn it, it is a fast editor to work with.
8
Why “emacs”? On many machines If you do a lot of programming, you will want to learn it. Multiple windows, multiple files Invoke compilers, make and debuggers from within it. Graphical interface
9
How to learn more “emacs” - Chapter 7 of UNIX in a Nutshell “emacs” - Control H t (tutorial) “vi” Chapter 8 of UNIX in a Nutshell “vi” “Introduction to ‘vi’”
10
File permissions Major part of UNIX security Three levels of permissions: –User (that’s you) –Group –Others Use the “chmod” command to change permissions
11
Permission options r - read w - write x - execute (examine) s - set id t - “sticky bit” u - user g - group o - other a - all + add - remove
12
Octal Representation First 3 bits = user rwx Second 3 = group rwx Last 3 = other rwx 666 Write by all (bad) 755 644 umask ### sets the standing file permissions for files created. Uses the “mask” to set permissions 077 -> 700 027 -> 750
13
“chmod” examples chmod ugo+r file.c chmod go-rwx directory chmod 755 a.out chmod u+rw,go-rw private
14
Processes A “process” is a program that is in memory. States: –Running –Stopped –Foreground –Background –Terminated
15
Commands “ps” Process Status “fg” Foreground “bg” background “jobs” Show jobs that are running “kill” Terminate w/ extreme prejudice
16
X Windows Graphical front-end to UNIX Can have many different “window managers” –Common Desktop Environment (CDE) –OpenWindows –KDE –Gnome
17
Useful X commands xterm xhost fvwm twm setenv DISPLAY machine-infront-of- you.edu:0 -display tristan.cs.geneseo.edu:0.0
18
More information about X AnswerBook in OpenWindows The “Help” key Man pages
19
More information... http://cbt.geneseo.edu (Computer Based Training) http://sunsite.unc.edu/mdw (Linux) http://sunsolve.sun.com (Sun help) http://www.cs.geneseo.edu/~kma
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.