% CST8207 Week 02 Notes – the shell, arguments and options, man pages, pathnames absolute and relative % Ian! D. Allen – – [www.idallen.com] % Winter 2015 - January to Apil 2015 - Updated Sun Jan 25 16:54:31 EST 2015 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. [Introduction to the Course, Outline, Timetable, Marks] 3. [The Unix/Linux Shell] – using the shell command line in Linux 4. [Command Arguments and Options] 5. [Finding Help in Manual Pages – RTFM] 6. [Unix/Linux File System and Pathnames (ROOT, absolute, relative, dot, dot dot] 7. [Directories: ROOT, /root, HOME, /home, and current] 8. [List of Commands You Should Know] - Create your [lynda.com] account and watch [Unix for Mac OS X 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. - Read All The Words, Do, and then Submit via Blackboard: - [Assignment #01 HTML] – Multi-tasking and Homework - [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. ### 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 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]. - [Worksheet #02 ODT] – Using standard Linux commands - [Worksheet #02 PDF] – Using standard Linux commands - [Worksheet #02 HTML] – Using standard Linux commands - `PS1, cd, find, less, ls, man, mkdir, passwd, pwd, rmdir` - [Worksheet #03 ODT] – Using standard Linux commands - [Worksheet #03 PDF] – Using standard Linux commands - [Worksheet #03 HTML] – Using standard Linux commands - `cat, clear, cp, find, grep, history, less, man, mv, rm, sleep, touch` Lab work this week ------------------ - [Assignment #02 HTML] will have you change your CLS password. - Your instructor will show you how to use [File Transfer] so that you can transfer files between your laptop computer and the CLS. - Finish the above assignments and start work on the first two worksheets. - The worksheets will be easier once we cover [File System and Pathnames][Unix/Linux File System and Pathnames (ROOT, absolute, relative, dot, dot dot]. Upcoming tests -------------- Read the [Test Instructions] (all the words) before your first midterm test. 1. First Midterm test: 45 minutes; in class 8am Thursday in Week 6 (February 12) 2. Second Midterm test: 45 minutes; in class 8am Thursday in Week 9 (March 12) Tests take place in your 8am lecture hour, not in your lab period. From the Class Notes link on the Course Home Page ================================================= - Review last week. Did you do everything assigned last week? - I put the link to the GNU Coreutils web site in the web page [Finding Help in Manual Pages – RTFM] Errors in submitted `assignment01.txt` -------------------------------------- As of Tuesday evening, 93/110 students submitted the first assignment. One student did not **Read All The Words** and put text in the Comments box. Five students did not **Read All The Words** and uploaded the wrong file name: xxxxxxxx: Bad file name: assignment.01.txt xxxxxxxx: Bad file name: Assingment01.txt xxxxxxxx: Bad file name: assingnment01.txt xxxxxxxx: Bad file name: assignment 01.txt xxxxxxxx: Bad file name: assignment01.txt.txt Nine students did not **Read All The Words** and used the wrong paragraph numbering system, e.g. `I-2A` or `I2-a` instead of the specified `(I-2a)`. Please: **Read All The Words** From the Classroom Whiteboard/Chalkboard ======================================== - **Take notes in class!** Your in-class notes would go here. - This week, we learn about using pathnames, especially relative pathnames. - Be careful about hidden Windows file extensions that cause uploaded file names with duplicate extensions similar to this: `assignment01.txt.txt`\ Turn on “show extensions” in your Windows host computer to avoid this problem. **Go to your assignment upload area and check your file name!** Real Sysadmin Work ================== Getting locked out of the server -------------------------------- - Dilbert: Being Attacked Your IP address is locked out of the CLS if the connection to the CLS fails before even asking for your login or password. To have the IP address unblocked, [contact your instructor]. Someone locks out their home IP from the CLS by trying to log in as user `date`: Jan 10 22:24:39 Invalid user date from 99.245.235.108 Jan 10 22:24:48 Failed password for invalid user date from 99.245.235.108 port 54505 ssh2 Jan 10 22:25:10 Failed password for invalid user date from 99.245.235.108 port 54505 ssh2 Jan 10 22:25:22 Connection closed by 99.245.235.108 [preauth] Jan 10 22:25:43 refused connect from cpe68b6fcf6cc73-cm68b6fcf6cc70.cpe.net.cable.rogers.com (99.245.235.108) Attacks on the Course Linux Server ---------------------------------- - I showed you the attacks on the CLS in your lab period last week. Here are some command pipelines you can copy and paste to get the latest attack numbers: $ fgrep -c "refused connect" /var/log/auth.log 4758 $ fgrep "refused connect" /var/log/auth.log | awk '{print $NF}' | sort | uniq -c | sort -nr | head 1581 (221.235.188.212) 485 (62.210.140.119) 187 (62.210.83.106) 150 (62.210.83.108) 149 (62.210.82.138) 144 (62.210.140.93) 132 (62.210.84.132) 123 (144.0.0.59) 117 (62.210.84.127) 106 (62.210.82.150) $ whois 221.235.188.212 ... descr: CHINANET Hubei province network descr: China Telecom descr: A12,Xin-Jie-Kou-Wai Street descr: Beijing 100088 $ whois 62.210.140.119 ... descr: IP Pool for Iliad-Entreprises Business Hosting Customers descr: Online SAS descr: Paris, France $ whois 144.0.0.59 ... descr: CHINANET SHANDONG PROVINCE NETWORK descr: China Telecom descr: No.31,jingrong street descr: Beijing 100032 Net Neutrality -------------- - USA threats to the level network playing field: - Canada’s Steve Anderson interviewed: - includes the John Oliver video on “Preventing Cable Company F***ery”. - Slides found by Kyle: Linux News ---------- - [City of Turin drops Windows for Linux] - [Learning to be a Linux Sysadmin] * * * * *  ![Take Notes in Class] -- | Ian! D. Allen - 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/ [Introduction to the Course, Outline, Timetable, Marks]: 050_course_introduction.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 [Unix/Linux File System and Pathnames (ROOT, absolute, relative, dot, dot dot]: 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 [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 [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 [File Transfer]: 015_file_transfer.html [Test Instructions]: 000_test_instructions.html [contact your instructor]: 070_course_linux_server.html#getting-locked-out-of-the-server [City of Turin drops Windows for Linux]: http://www.zdnet.com/city-of-turin-decides-to-ditch-windows-xp-for-ubuntu-and-6m-saving-7000033482/ [Learning to be a Linux Sysadmin]: http://archive.oreilly.com/pub/post/linux_system_administration_th.html [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Plain Text]: week02notes.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/