------------------------ Week 7 Notes for DAT2330 ------------------------ -Ian! D. Allen - idallen@idallen.ca Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) ------ Review ------ In Week 6 (week06notes.txt) you learned about file and directory permissions and the Unix file system (inodes and hard links). You know how to use the tar command. You can read and post to Usenet news groups. You can fetch a file using anonymous ftp. You got an account on the Course Linux Server and moved all your files there from ACADUNIX using tar and scp. You received Exercise #6 and submitted it by the due date. You now know some basic meaning and usage of these Unix/Linux commands: bash passwd pwd cd mkdir rmdir rm ls vim cat more less man echo cp stty du wc date chmod who mesg mv head tail touch sort grep file diff sleep which whereis ^Z fg bg kill ln tar ssh scp ftp Review questions: - Does the command name used on a command line affect the number of arguments passed by the shell? Answer: NO - Does the presence of redirection on a command line affect the number of arguments passed by the shell? Answer: NO ------------------ This Week (Week 7) ------------------ Topics: * using gzip/gunzip (and tar) * "Archive and Compression Utilities" Chapter 7, p.175 * "Using gzip and bzip2" Chapter 7, p.175 * Permissions for new files and directories: umask * Starting a shell script: $PATH and umask * Control structures: test, IF/ELIF/ELSE/FI, WHILE/DO/DONE, FOR/IN/DO/DONE * "Shell Programming" Chapter 13, p.448 * Program development: gcc, g++ Unix commands used this week (RTFM): umask if/else/elif/fi while/do/done for/in/do/done gzip gunzip zcat zless zgrep 1. Readings in Running Linux: * "Archive and Compression Utilities" Chapter 7, p.175 * "Using gzip and bzip2" Chapter 7, p.175 * "Shell Programming" Chapter 13, p.448 * "Programming Languages" Chapter 13, p.426 * "Programming with gcc" Chapter 13, p.427 * "Quick Overview" Chapter 13, p.428 * "gcc Features" Chapter 13, p.429 * "Basic gcc Usage" Chapter 13, p.430 * "Using Multiple Source Files" Chapter 13, p.432 * "Optimizing" Chapter 13, p.432 * "Enabling Debugging Code" Chapter 13, p.433 * "More Fun with Libraries" Chapter 13, p.433 2. Read these files under the Notes button on the course home page: umask.txt - Umask and Permissions shell_script_execution.txt - How a Shell Script is "Executed" course_linux_server.txt - File transfer to/from the Course Linux Server shell_prompt.txt - Setting the BASH shell prompt tar_GNU_and_not.txt - ACADUNIX tar commands (GNU and not-GNU) argv.c.txt - Display the arguments on the command line (C) argv.c++.txt - Display the arguments on the command line (C++) stdxxx.c++.txt - Output on stdout and stderr, prompt and reads from stdin 3. Start work on DAT2330 Exercise #7 (when available). Submit it by the due date.