Unformatted text preview:

Slide Number 1Slide Number 2Slide Number 3Slide Number 4Slide Number 5Slide Number 6Slide Number 7Slide Number 8Slide Number 9Slide Number 10Slide Number 11Slide Number 12Slide Number 13Slide Number 14Slide Number 15Slide Number 16Slide Number 17Slide Number 18Slide Number 19Slide Number 20Slide Number 21Slide Number 22Slide Number 23Why Learn Unix (or its variations)?• Many Unix systems (Solaris on Sun workstations, IRIX on SGI workstations, AIX on IBM servers, various versions of Linux on PCs, FreeBSD, OpenBSD)• Unix provided the basis (since 1970s) for many operating system concepts and features (multi-tasking, shell and scripting, hierarchical file systems)• Apple Computer’s Mac OS X is Unix-based, see a wikipedia article, and a brief Unix timeline• Mac OS X and Unix articles (tutorial, advanced Unix, how- to’s)• The Law Enforcement and Forensic Examiner's Introduction to Linux, v.3.65 by Barry J. GrundyLayered Structure of the Unix/Linux Operating System:Applications (GUI, web browser, word processor, ftp, etc.)Shells (sh, bash, csh, tcsh, etc.)Language libraries (C, Java, Ada, FORTRAN) System calls (open, close, fork)Unix kernel:File system, process manager, memory manager, CPU schedulerDevice driversHardware (CPU, RAM, BIOS, hard disk, CD-ROM, monitor)Application User Interface (AUI)Application programmer’s Interface (API)Operating SystemUnix file systems:• The Unix operating system started out as a file system. All system entities are considered as files, including regular files (text or binary), directories, devices, links, pipes, and sockets.• A typical file system tree looks as follows:/ (root)bin boot dev etc home lib lost+found mnt opt proc root sbin tmp usr var/bin – binary (executable) images of commands such as cat, chmod, cp, kill, ls, mkdir, mv, ps, pwd, rm, rmdir, su, vi/boot – image of kernel to boot the system/dev – devices (special files) including character special and block special/etc – configuration information/home – user home directories/lib – language libraries for C, C++, Java, Ada, FORTRAN/lost+found – files not connected to other directory, which are found using the tool fsck (file system check)/mnt – mount points for other file systems such CD-ROM, floppy, using the mount command/opt – add-on packages/proc – process (task) information/root – information about the root (administrator) account/sbin – system administration tools such as init, shutdown/tmp – temporary files used by several commands (e.g. editor)/usr – contains subdirectories bin, doc, include, lib, local, man, src, tmp, shared by all users/var – variable data such as incoming mailHow are files represented and saved on disk:1076 syllabus.txt 2085 lab1.c 20345 lab2.java …Contents of directory ~/coursesinode tablefile type number of links file mode user ID group ID creation time modification time access time …disk addressinode for file lab1.cinumber file namedisk driveCommon Unix shells and commands:• shells with increasing functionality:sh (Bourne shell) Æ bash (Bourne again shell, used in Linux)ksh (Korn shell) Æ zshcsh (C shell) Æ tcsh (TC shell)• File-related commands:ls (list contents of directory, similar to dir in DOS, options include -l for long format, -a to show all files, -R to show files in the entire directory tree, -t to show last modified file first)cat (concatenate and display file, e.g. cat lab1.c)rm (remove file); mv (move or rename file); mkdir (create directory); rmdir (delete directory file); cd (change directory); pwd (show current or working directory); chmod (change protection mode); chown (change owner)• Process-related commands:ps (report process status)w or who (display information about logged-in user)kill (terminate process)top (display and update top CPU users)fg (bring background process to foreground)• editors (vi, pico, emacs)• special symbols understood by the shell:< (input redirection, e.g. a.out < data.txt); > (output redirection); >> (append); & (run in the background, e.g. a.out&); | (pipe); wildcard characters such as * (matches all), ? (matches any)Unix File Security:• password-based protectionUsers are identified at login by the user’s login name and password; file accesses are then based on the associated user id• encryption-based protectionuse crypt or des (data encryption standard) to encrypt files• access-permission basedEach user has an associated UID (user ID) and GID (group ID); the file permission bits prescribe the access rights to 3 kinds of users: the owner, users in the same group, and others; the owner of the file can change the file’s permission bits using the chmod command.Long listing of files and file permissions:Consider the output of the ls –lt command:$ ls –ltdrwxr-xr-x 2 lang faculty 512 Jan 15 13:46 sp2002 -rw-r--r-- 1 lang faculty 26624 Jan 5 2001 syllalgfa00.doc -rw-r--r-- 1 lang faculty 741 Dec 14 2000 score.fa00.outNote that the file permission bits consists of 10 characters, the first indicates file type (d for directory, - for ordinary, b or c for devices, l for symbolic link), the next 9 characters are combinations of r, w, x (and s) in 3 groups.File type and permission bitsLink countownergroup size in bytesFile last modification date and timefile nameFile access permissions:r – read access; w – write access; x – execute access (or search for directory files); s – set-user-id turn on (so that when executed the effective user id is temporarily changed to that of the owner’s)Thus, the permission drwxr-xr-x means rwx rights for the owner, r (read) and x (access, search) rights for the group and for others; similarly, the permission -rw-r--r– means r (read) and w (write) rights of the owner, r (read) right for group and others.Note that the x permission means access or search for directory files, that is, the right to change directory (cd) to there, to access any file located in that directory, etc. The administrator of a Unix system has a user name ‘root’ who has access rights to all files.How to use the chmod command:• use the letters u (user), g (group), o (others), a (all) for the who; use + (to add), - (to remove) and = (to set) for privileges; or• use octal (base 8) numbers for combinations of the rwx rights (r = 4, w =2, and x


View Full Document

UCF CIS 3003 - Lecture Notes

Documents in this Course
Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?