1
MTU Computer Structure Home directory: h drive Same for Suns & PC s Location to store files Organize files by creating appropriate directories (folders) Subdirectory - any directory within in another 2
General Unix Information Command line in xterm looks like: windsor.civil(3)% windsor.civil = machine name 3 = command number Good Unix Command Web Site: http://www.geek-girl.com/unix.html http://www.cee.mtu.edu/~bhhamlin/gn120/ 3
Unix Command Basics xterm = window where you do text commands ctrl c = cancels a command more = hit space bar to continue through text 4
Unix Commands to Know man history clear cd pwd mkdir rmdir ls mv rm more sendfile chmod top ps who kill lpq lprm 5
Detailed Commands man_command - manual page for command cd_dirname - change (sub)directory per path and/or name cd - return to parent directory cd_.. - go back one directory level pwd - present working directory 6
Detailed Commands Continued mkdir_dirname - makes a directory rmdir_dirname - removes a directory rm_filename - removes a file more_filename - displays contents of a text file mv_ name1_name2 - moves a file into another directory, renames a file or directory 7
Detailed Commands Continued top - displays active central processing jobs, periodically updated, has PID number PID - process identification number ps - lists processes you are using at a given time, has PID number kill_pid - kills process with given PID 8
Detailed Commands Continued lpq - displays default printer queue lpq_-pprinter-name - printer queue for a given printer lprm - removes a print job from the queue on the default printer if it belongs to you lprm_- Pprinter-name - removes a print job from a specific printer 9
List files ls - lists contents of a given directory ls_-l - lists contents in long form, contains permissions for file chmod_###_filename - changes the permissions on a given file or directory ### - refers to number designation for permissions 10
Permissions Designations for a file or directory: d = directory r = read (can read file) w = write (can change file) x = execute (can execute program) 11
File/Directory Permission Structure 10 characters: 1 = directory 2-4 = user (you) 5-7 = group (specific users) 8-10 = others (everyone else) Example: -rwxr-xr-x (typical web page file designation) 12
Permission Specifics Each permission has a numeric value assigned Example: chmod 755 index.html Value Permission 0 Locked 1 x 2 w 4 r 13
FTP File Transfer Protocol tool for transferring files between computers 14
Running FTP ftp hostname port hostname - required port - only necessary if a specific value is required Example: ftp login.cee.mtu.edu 15
FTP Commands help_command - help on a given command; help alone is a list of ftp commands available at the site you accessed bye - quits ftp connection close - ends ftp session with remote computer and returns you to your home computer 16
More FTP Commands get_filename - gets a remote file and stores it on your computer mget_filename - gets multiple files put_filename - puts a file from your computer onto a remote location mput_filename - puts multiple files dir - listing of files in a given directory 17
Even More FTP Commands ascii - sets ftp to ascii mode, usually this is the default binary - sets ftp to binary; used to transfer binary file (i.e.: graphics, executables, audio) 18
Anonymous FTP Used to retrieve files from computers that allow public access Do not need account or password account: anonymous password: internet address, e-mail ID, guest 19
FTP Uses Transfer files from dorm computer to your H: drive Obtain copies of freeware or shareware freeware - free software (not guaranteed to be free of glitches or errors) shareware - typically trial software package 20
Group Assignment Come up with two potential quiz questions: Based on today s lecture Structure: Group number Student Names Write 2 questions and answers - must be viable questions After submitted, can leave 21