Bellevue University CIS 240 - PowerPoint PPT Presentation

1 / 59
About This Presentation
Title:

Bellevue University CIS 240

Description:

50 Question multiple choice, True/False, and fill in the blanks ... Gunzip, untar, compile, and run the file and record the results on the paper. ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 60
Provided by: JohnRu
Category:

less

Transcript and Presenter's Notes

Title: Bellevue University CIS 240


1
Bellevue UniversityCIS 240
Final Review
2
The test
  • Monday, Dec 11, 2002 at 100PM
  • 50 Question multiple choice, True/False, and fill
    in the blanks
  • gt1.5 minutes/question (90 minutes total)
  • Closed book, closed notes, open computer, closed
    communication between students (for test)
  • Practical portion will include connecting to an
    NFS share and downloading a tar.gz file to your
    machine. Gunzip, untar, compile, and run the file
    and record the results on the paper.
  • About 30 minutes allowed for the practical.

3
Scoring
  • 2 points for each correct answer
  • If the entire class gets a question wrong, it
    will be thrown out and 2 points will be credited
    to each student

4
What will be tested
  • Processes
  • The network file system
  • Sending messages (not tested extensively)
  • Using E-Mail (not tested extensively)
  • Backing up files
  • Transferring files

5
What is a Process?
  • Executable code
  • Data
  • Open files
  • Stack space

6
Viewing processes
  • ps is used to view the status of processes
  • ps gives you the following information
  • Process ID
  • Terminal ID of owner
  • State
  • Running Time
  • Command name

7
Example
  • ps
  • PID TTY TIME CMD
  • tty1 000000 bash
  • 9982 tty1 000000 ps

8
Killing a process
  • kill is used
  • Must be root or process owner to kill it

9
Example
  • ps
  • PID TTY TIME CMD
  • tty1 000000 bash
  • tty1 000000 ps
  • tty1 000000 vi
  • kill 9983

10
Foreground vs Background
  • Foreground processes
  • no access to shell while the command is executing
  • Background processes
  • Access to shell while command is executing
  • Run at lower priority then foreground processes

11
Format for Running a Background Process
  • ltcommandgt

12
More options for ps
  • -A Displays information about all processes
    running on your system
  • -e Same as -A
  • -l Displays a long list of of processes that
    includes a 14 column status report
  • -u Displays information about processes
    belonging to users

13
Stopping and restarting background processes
  • Use jobs to identify the job number of the
    background process
  • Use fg ltjob numbergt to bring it to the
    foreground
  • Use ltctrlgt z to pause it
  • Use fg ltjob numbergt to resume it
  • Use bg to return it to the background

14
daemons
  • System processes
  • Running in the background
  • Can be viewed by entering ps ?A
  • daemons will have a question mark for a TTY
    identifier

15
What will be tested
  • Processes
  • The network file system
  • Sending messages (not tested extensively)
  • Using E-Mail (not tested extensively)
  • Backing up files
  • Transferring files

16
Network File System
  • Allows files on remote computers to be accessed
    as though they reside on a local computer
  • Operates on the client server model

17
Client Server Model
  • Server makes the file system available and
    controls access to it
  • Client mounts the server?s file system as part of
    its own
  • Client and server directories can be different
    (usually are different)

18
NFS on the server
  • The server must be running the following daemons
    (RPC, portmap, biod, mountd, nfsd)
  • The server must make files visible to remote
    systems (using /etc/exports file)

19
NFS on the client
  • The client must be running the RPC, portmap, and
    biod daemons
  • The client mounts the remote file system using
    the mount command

20
Adding a file system (won?t be tested
extensively)
  • Use vi to edit the /etc/exports file
  • Add a line for each file system to be shared
  • Format
  • ltdirectorygt ltauthorized usergt
  • Example
  • /home/export 10.0.3.43

21
NFS
  • Once mounted, filesystem is subject to the
    permissions assigned by the server

22
The mount Command
  • Adds a new file system to the directory
  • Allows other devices (floppy/cd rom/ etc) to be
    accessed by linux
  • Allows file systems to be mounted from other
    computers using the Network File System
  • Note You must create the filesystem before you
    can mount it

23
Creating a file system
  • mke2fs /dev/fd0 1440

size
command
path
24
Format of mount command
  • mount ?t ext2 /dev/fd0 /mnt

type
device
path
command
25
unmounting
  • Unmounting removes the file system from your file
    structure.
  • It is done when you intend to remove the media
    containing the file system from the computer.
  • Note You must unmount a file system before you
    remove the floppy from the device. Failure to do
    so can render the files on the floppy
    inaccessible

26
umount
  • Format
  • umount ltpath name of devicegt
  • Example
  • umount /dev/fd0

27
Mounting an MSDOS Floppy
  • mount ?t msdos /dev/fd0 /mnt

Type of file system is MSDOS
Note Floppy diskette must be formatted with
MSDOS filesystem
28
What?s Mounted?
  • To view what you have mounted, use the mount
    command by itself.
  • Format
  • mount

29
Issues
  • The server can give a client complete access to
    its file system (security issue)
  • If the server goes down while the client is
    mounted to the NFS filesystem, the client can
    (and usually does) lock up

30
What will be tested
  • Processes
  • The network file system
  • Sending messages (not tested extensively)
  • Using E-Mail (not tested extensively)
  • Backing up files
  • Transferring files

31
One-way real-time message
  • Use the write command to send a one-way message
    to another user.
  • Both of you must be logged into the same computer
  • Both of you must have messaging turned on

32
write
  • Format
  • write ltusergt
  • Your message goes here
  • ltCtrlgtd

33
Using write
  • Use who to see who is logged on
  • Enter the write command
  • After pressing enter, type your message
  • When you are finished, type control d to exit and
    send your message

34
If write does not work
  • The user you have selected may have messaging
    turned off
  • Messaging can create problems, and users turn it
    off if it becomes objectionable
  • Users may turn messaging on or off using the mesg
    command

35
mesg
  • Format
  • mesg ltoptiongt
  • Option Description
  • y Grant permission to other users to send
    messages to your terminal
  • n Deny permission to other users
    to send messages to your terminal

36
What will be tested
  • Processes
  • The network file system
  • Sending messages (not tested extensively)
  • Using E-Mail (not tested extensively)
  • Backing up files
  • Transferring files

37
mail
  • Covered in Chapter 10 of your book
  • The basic program that everybody has
  • Command line interface
  • Not based on vi

38
Using Mail
  • Format
  • mail ltrecipientgt
  • Example
  • mail jrussell (to send a message)
  • mail (to check your mailbox)

39
Process for sending mail
  • Enter mail ltrecipientgt
  • Enter subject
  • Enter message text
  • Enter addresses for courtesy copies
  • Send message

40
Process for reading mail
  • Enter mail
  • Enter the number of the message you want to read
  • Enter d and the number of the message to delete
    it after reading
  • Exit with q to remove messages from mailbox

41
A Few Basic Commands
  • Help ? Prints command summary
  • Edit e Edits a message
  • Exit x Quits without saving
  • Quit q Quits with a save
  • Delete d Deletes a message
  • List f Lists messages

42
What will be tested
  • Processes
  • The network file system
  • Sending messages (not tested extensively)
  • Using E-Mail (not tested extensively)
  • Backing up files
  • Transferring files

43
Tape Archive Utility
  • Command is tar
  • tar can be used to back up and restore files
  • tar puts all files and directories into a single
    archive file.
  • Files are compressed when they are stored
  • Files can be backed up to a device or a directory

44
tar
  • Format
  • tar ltoptionsgt ltarchivegt ltfile(s)gt

45
Options
  • c Create an archive file and add files to it
  • r Record files at the end of the archive
    (append)
  • t List the contents of an archive file
  • u Update by adding new or changed files
  • x Extract files from archive (restore)
  • v Verbose mode
  • f ltarchivegt name of archive file

46
Archive
  • Can be device, such as tape backup,
    recordable/rewritable CD ROM, or floppy
  • Can be a path name on an existing mounted device

47
file(s)
  • Relative or absolute path name of files
  • Must be specified for backup (tar responds with
    ?Cowardly refusing to create empty tape archive??
    error message if you don?t)
  • A period indicates all files at the current
    location are to be backed up.
  • Default for restore operation is all files in the
    archive.

48
Backup
  • Example
  • tar cvf archive1.tar .
  • Backs up all files in the current directory to
    archive1.tar. Provides a complete list of backup
    operations.

49
Restore
  • Example
  • tar xvf archive1.tar
  • Restores all files and directories in
    archive1.tar to the current directory

50
View
  • Example
  • tar tvf archive1.tar
  • Prints a list of all files and directories in the
    archive.

51
Tips
  • Case is important
  • Spaces are important
  • Using an incorrect option will cause
    unpredictable results
  • ltCtrl Cgt will break you out of tar

52
Other uses for tar
  • Files can be combined for uploading or
    downloading and compressed using gzip (transfer
    multiple files with one command)
  • Individual files can be compressed using gzip and
    stored in tar format on a server to reduce the
    amount of space they take up

53
Using tar with a floppy diskette
  • Works with or without a file system.
  • Diskette without a file system cannot be mounted.
  • I recommend you use mke2fs to create a Unix file
    system, then mount the device before archiving to
    it.

54
What will be tested
  • Processes
  • The network file system
  • Sending messages (not tested extensively)
  • Using E-Mail (not tested extensively)
  • Backing up files
  • Transferring files

55
File Transfer Protocol (ftp)
  • Utility program for moving files between
    computers
  • Named after its underlying protocol
  • Implemented with ftp program on client and ftpd
    daemon on the server

56
ftp
  • Format
  • ftp lthost computergt
  • Where lthost computergt is a host name or IP
    address
  • Example
  • ftp academic2.bellevue.edu

57
Requirements
  • Connection between you and the host computer
  • Host must be set up as an ftp server
  • Must have an account on the host or host must
    allow anonymous login

58
Anonymous Login
  • User ID is anonymous
  • Password is your E-Mail address

59
Commands
  • ls View files on host computer
  • cd Change directory on host computer
  • ! Execute a command on a local computer
  • put Move a file from local to host computer
  • get Move a file from host to local computer
  • close Close the current ftp session
  • quit Exit out of ftp
  • ? Help
Write a Comment
User Comments (0)
About PowerShow.com