% CST8207 Week 02 Notes -- the shell, arguments and options, man pages, pathnames absolute and relative % Ian! D. Allen -- -- [www.idallen.com] % Fall 2016 - September to December 2016 - Updated 2017-01-20 00:48 EST - [Course Home Page] - [Course Outline] - [All Weeks] - [Plain Text] Readings, Assignments, Labs, Tests, and ToDo ============================================ Read (at least) these things (All The Words) -------------------------------------------- 1. [Week 02 Notes HTML] -- this file -- **Read All The Words** 2. [Remote Login] -- using networks to connect to other computers 3. [Course Linux Server] -- a Linux computer accessible on the network by [Remote Login] 4. [File Transfer] -- File transfer to/from Unix/Linux machines 5. [The Unix/Linux Shell] -- using the shell command line in Linux 6. [Command Arguments and Options] 7. [Finding Help in Manual Pages -- RTFM] 8. [File System and Pathnames] -- ROOT, absolute, relative, dot, dot dot 9. [Directories: ROOT, /root, HOME, /home, and current] 10. [List of Commands You Should Know] 11. [Linux and Sysadmin News in the World] - Create your [lynda.com] account and watch these sections of [Unix for Mac OS X Users] - these videos are for *all* Unix/Linux students, not just Mac OSX users - **1. Intro to Unix** - Command structure 5m 22s - command names, options, and arguments - Kernels and shells 5m 25s - the O/S core vs. the shell programs that read your command line - Unix manual pages 4m 6s - `man` - how to get help on every Unix/Linux command name - some say this is "the most valuable movie", "your best friend" - **2. Filesystem Basics** - The working directory 2m 49s - `pwd` - Listing files and directories 3m 59s - `pwd`, `ls`, hidden files - Moving around the filesystem 4m 58s - `cd`, TAB filename completion, absolute/relative paths - Filesystem organization 4m 12s - ROOT, standard Unix folders - **3. Working with Files and Directories** - Naming files 5m 41s - Unix is case-sensitive, OSX is case-insensitive! - avoid special characters or blanks in Unix pathnames Assignments this week --------------------- Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant. Just like in the Real World, not all due dates are on the same days or at the same times. - Review last week. Did you do everything assigned last week? - Read All The Words, Do, and then Submit via Blackboard: - [Assignment #01 HTML] -- Multi-tasking and Schoolwork - [Assignment #02 HTML] -- Course Linux Server simple commands - Really do **Read All The Words**. You don't get a second chance to get it right. Lab work this week ------------------ - This week in lecture we learn about the terminal, the shell, and using pathnames, especially relative pathnames. - Last week, your instructor showed you how to log in to the [Course Linux Server] and use some simple commands. - This week, your instructor will demonstrate a [File Transfer] so that you can transfer files from the CLS to your laptop computer for uploading to Blackboard. - [Assignment #02 HTML] will have you log in to the CLS, do some simple commands with output redirection, and change your CLS password. - After you finish the above assignments, read [File System and Pathnames]. - If you understand pathnames, start work on the first two worksheets. ### Worksheets Worksheets are preparation for your assignments. You can't do the assignments without having done the worksheets first, and you can't do the worksheets without having first read the Course Notes: 1. Read. 2. Worksheet. 3. Assignment. Form a small study group to do the worksheets. Each person tries the example given, and you make sure you all get the same answers. Worksheets are not for hand-in; they are not worth marks; the assignments test your knowledge of the lectures and worksheets. > The worksheets are available in four formats: Open Office (ODT), PDF, HTML, > and Text. Only the Open Office format allows you "fill in the blanks" in > the worksheet. The PDF format looks good but doesn't allow you to type into > the blanks in the worksheet. The HTML format is crude but useful for quick > for viewing online. Do **NOT** open the Worksheet ODT files using any Microsoft products; they will mangle the format and mis-number the questions. Use the free Libre Office or Open Office programs to open these ODT documents. On campus, you can [download Libre Office here]. These first two worksheets require you to have read [File System and Pathnames]: - [Worksheet #02 ODT] -- Using standard Linux commands I - [Worksheet #02 PDF] - [Worksheet #02 HTML] - `PS1, cd, find, less, ls, man, mkdir, passwd, pwd, rmdir` - [Worksheet #03 ODT] -- Using standard Linux commands II - [Worksheet #03 PDF] - [Worksheet #03 HTML] - `cat, clear, cp, find, grep, history, less, man, mv, rm, sleep, touch` Worksheets prepare you for the upcoming assignments. Locked out of the Course Linux Server ------------------------------------- This student did not **Read All The Words** about login userid and password and got his IP address locked out of the server Sunday evening: Sep 11 17:49:32 Invalid user [D from 99.100.32.22 Sep 11 17:50:27 Failed password for invalid user [D from 99.100.32.22 Sep 11 18:42:28 Invalid user 040999999 from 99.100.32.22 Sep 11 18:42:50 Failed password for invalid user 040999999 from 99.100.32.22 Sep 11 18:43:36 Failed password for invalid user 040999999 from 99.100.32.22 Sep 11 18:44:33 Invalid user 040999999 from 99.100.32.22 Sep 11 18:45:06 refused connect from xxx.dsl.bell.ca (99.100.32.22) When you are locked out, [follow the directions] in the notes to get your IP address re-enabled. Assignment #1: Read All The Words --------------------------------- - 155 of 192 students submitted the first assignment. - Seven people were late; review the course policy on late assignments in the Week 1 notes. - One person submitted Rich Text Format instead of Plain Text. - One person submitted an empty file (with a wrong name). - 14 students each used the wrong file name: Bad file name: Assignment 01.txt Bad file name: assignment01.txt.rtf Bad file name: assignment01.txt.txt Bad file name: assigniment01.text Bad file name: assignment 01.txt Bad file name: assignment1.txt Bad file name: Assignment01.txt Bad file name: Assignment.txt Bad file name: assignment01.txt.txt Bad file name: assignment1.txt Bad file name: assignment01.txt.txt Bad file name: assignment 01.txt Bad file name: Assignment01.txt Bad file name: assginment01.txt - 20 students did not use the exact numbering specified in the assignment: (I - 2a ) (I {96} 2a) # uses non-ASCII hyphen -- did not use Notepad (I-2C) (I-2b ) (I-3c) (I-a (I=2a) (i-2c) I-2a I-2a) I-2a. I-2a: {I-2.a} - 21 people used a word processor instead of Notepad, resulting in non-ASCII characters such as Microsoft "Smart Quotes" and Unicode instead of Plain Text: what I <92>m getting whether it<92>s an home results can<92>t be I don<92>t see word <91>Schoolwork<92> means I don<92>t really Further, it<92>s good song that<92>s playing. I<92>m not actually remembering till I<92>m done call <93>avoiding disturb<94>. be <93>just to pass course<94>. it<92>s pretty even don{226}{128}{153}t necessarily I{226}{128}{153}ll rewrite {239}{187}{191}Multi-Tasking Considered Harmful you{226}{128}{153}ll be self {239}{187}{191}(I-2a) My method moment{226}{128}{153}s notice (I <96> 2a) Multi-tasking Please Read All The Words. Notes from the Classroom ======================== - **Take notes in class!** Keep a pad open on your desk. - This week, we learn about the terminal, the shell, and using pathnames, especially relative pathnames. - Keep a notebook with a [List of Commands][List of Commands You Should Know] in it. - You need to write down yourself what each command *does*. - Used in class and lab this week: - Commands: `cal cat cmatrix date echo exit figlet file history less ls sl toilet users wc who` - Terminal: `^L ^W ^U ^C ^D ^R ^Z UpArrow DownArrow` - Your instructor will also show you how to use [File Transfer] so that you can transfer files between your laptop computer and the CLS. ![Take Notes in Class] -- | Ian! D. Allen, BA, MMath - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [www.idallen.com]: http://www.idallen.com/ [Course Home Page]: .. [Course Outline]: course_outline.pdf [All Weeks]: indexcgi.cgi [Plain Text]: week02notes.txt [Week 02 Notes HTML]: week02notes.html [Remote Login]: 110_remote_login.html [Course Linux Server]: 070_course_linux_server.html [File Transfer]: 015_file_transfer.html [The Unix/Linux Shell]: 120_shell_basics.html [Command Arguments and Options]: 150_arguments_and_options.html [Finding Help in Manual Pages -- RTFM]: 140_man_page_RTFM.html [File System and Pathnames]: 160_pathnames.html [Directories: ROOT, /root, HOME, /home, and current]: 170_home_and_HOME.html [List of Commands You Should Know]: 900_unix_command_list.html [Linux and Sysadmin News in the World]: 950_linux_world.html [lynda.com]: http://algonquincollege.com/onlineresources/mobileStudent/lynda.htm [Unix for Mac OS X Users]: http://www.lynda.com/Mac-OS-X-10-6-tutorials/Unix-for-Mac-OS-X-Users/78546-2.html [Assignment #01 HTML]: assignment01.html [Assignment #02 HTML]: assignment02.html [download Libre Office here]: 050_course_introduction.html#install-libreoffice-or-openoffice-into-windows [Worksheet #02 ODT]: worksheet02.odt [Worksheet #02 PDF]: worksheet02.pdf [Worksheet #02 HTML]: worksheet02.html [Worksheet #03 ODT]: worksheet03.odt [Worksheet #03 PDF]: worksheet03.pdf [Worksheet #03 HTML]: worksheet03.html [follow the directions]: 070_course_linux_server.html#getting-locked-out-of-the-server [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/