% CST8207 Week 11 Notes – processes, jobs, kill, at, cron, users and groups % Ian! D. Allen – – [www.idallen.com] % Fall 2014 - September to December 2014 - Updated Thu Nov 13 12:08:09 EST 2014 Readings, Assignments, Labs, and ToDo ===================================== - Read (at least) these things (All The Words): - [Week 11 Notes HTML] – this file – **Read All The Words** - [Unix/Linux Processes, Jobs, background, foreground, kill, killall] - [Delayed and Repeated Scheduled Execution - at, cron, and crontab] - [Users and Groups - /etc/passwd, /etc/group, su, sudo, chsh, useradd, gpasswd, etc.] - [Unix/Linux Partitions and File Systems - fdisk, mkfs, mount, swap] - [List of Commands You Should Know] - [Video Tutorials on Lynda.com] - Using your [lynda.com] account, watch [Unix for Mac OS X Users] - **4. Ownership and Permissions 34m 58s** - Setting permissions using octal notation 3m 49s - The `root` user 1m 57s - `sudo` and `sudoers` 5m 20s - **5. Commands and Programs 52m 34s** - System information commands 3m 40s - date, uptime, users, who, uname, hostname, domainname - Viewing processes 5m 0s - ps - Monitoring processes 3m 36s - top - Stopping processes 3m 19s - kill Assignments, Quizzes, and Lab work this week -------------------------------------------- **Reminder:** There are now two quizzes that you need to complete on Blackboard as part of your term Quiz mark. A third quiz will be posted before the Final Exam. 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 #07 HTML] – setting permissions, mode, umask - [Assignment #09 HTML] – tar, processes, syslog, crontab, at, mail - [Assignment #10 HTML] – CentOS 6.6 Installation and Configuration - 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] online viewing: [Worksheet #02 HTML] – Using standard Linux commands I - `PS1, cd, find, less, ls, man, mkdir, passwd, pwd, rmdir` - [Worksheet #03 ODT] online viewing: [Worksheet #03 HTML] – Using standard Linux commands II - `cat, clear, cp, find, grep, history, less, man, mv, rm, sleep, touch` - [Worksheet #04 ODT] online viewing: [Worksheet #04 HTML] – GLOB Patterns and Aliases - bash GLOB patterns (wildcards), `alias, sum` - [Worksheet #05 ODT] online viewing: [Worksheet #05 HTML] – I/O Redirection and Pipes - bash I/O redirection (including pipes), `date, head, nl, tail, tr, wc` - [Worksheet #08 ODT] online viewing: [Worksheet #08 HTML] – minimal permissions, mode, umask, octal - `chmod, ls -lid, umask` ### Optional Bonus Assignments – extra marks - [Assignment #03 HTML] – *Optional* BONUS VIM Text Editor Practice - this is an *optional* worksheet for a BONUS assignment using `vim` - Optional Reading: [The VI (VIM) Text Editor] - [Worksheet #06 HTML] – *Optional* VIM Text Editor Practice - this is an *optional* worksheet for a BONUS assignment using `vim` - Optional command-line VIM tutorial: the `vimtutor` program on the CLS. - [Assignment #05 HTML] – *Optional* BONUS Midterm Assignment - This is an *optional* BONUS assignment reviewing your midterm test. - There is an Assignment #5 checking script available to verify the format of your file before you submit it for marking, but only people who **Read All The Words** here will know about it. - **New Due Date** due to Blackboard failure last week. - [Assignment #08 HTML] – *Optional* BONUS Midterm Assignment - This is an *optional* BONUS assignment reviewing your midterm test. - There is an Assignment #8 checking script available to verify the format of your file before you submit it for marking, but only people who **Read All The Words** here will know about it. From the Class Notes link on the Course Home Page ================================================= - Review last week. Did you do everything assigned last week? From the Classroom Whiteboard/Chalkboard ======================================== - **Take notes in class!** Your in-class notes would go here. - [179 Practice Test #3 questions] are available along with an answer key in the [Class Notes]. Questions are mostly on the last third of the course. See the [Practice Test README] page. **The Final Exam covers the whole course, not just this practice test.** - A Quiz on these questions will be available on Blackboard. See the [Week 04 Notes HTML] for how quizzes work. Not all practice questions appear in the quizzes. **The Final Exam covers the whole course, not just this practice test.** - On the CLS your selected editor for `crontab -e` is stored in the file `~/.selected_editor` and can be changed with the command `select-editor` - Choose a basic version of VIM. Your CentOS Linux install will have no other editor. - The `diff` command from [GNU Diffutils]: - `diff file1 file2` - Lines starting with `<` are in file on left (`file1`) ; lines starting with `>` are in file on right (`file2`). - [Description of Output] - If you know VI, use a wide terminal screen and try `vimdiff` - If you run a Linux GUI, see also `meld` (and `gvimdiff` for VI) - Advanced answer to [Assignment #06] **easy**, **medium**, etc. disk usage a. Find all the inode numbers under `foo` and print them one per line b. For each line, run `find` to find all inodes with that number and delete. - Patrick Ouellette will be giving a presentation on the 3rd year Security program in B370 on Tuesday, November 11th at 5:30pm. More information on the program is available here: Learning the Material --------------------- - You learn the material because you want to be a Computer Systems Technician. - You like doing this work; you want to be good at it. - Review your mistakes on the first midterm test (questions re-appear). - For practice tests and quizzes, see the [Practice Test README] - Review the commands used in each lab worksheet (and their common options). - [Unix/Linux Command List][List of Commands You Should Know] - Review how the shell works: GLOB, redirection, quotes - Know **why** the shell behaves that way. Copy/paste teaches you nothing. - process quotes, split on semicolons and pipes next, then do redirection - What are the Four Rules for Output Redirection? Three Rules for Pipes? - [Unix Shell I/O Redirection (including Pipes)] Real Sysadmin Work ================== - Microsoft opens source code on .NET platform - [GeekWire] - [Microsoft Blog] *Today, we are taking the next big step for the Microsoft developer platform, opening up access to .NET and Visual Studio to an even broader set of developers by beginning the process of open-sourcing the full .NET server core stack and introducing a new free and fully-featured edition of Visual Studio.* - The [Future of VIM] - [NSA hunts System Administrators] ![Take Notes in Class] ![Read All The Words by Alex and Colin] -- | 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/ [Unix/Linux Processes, Jobs, background, foreground, kill, killall]: 600_processes_and_jobs.html [Delayed and Repeated Scheduled Execution - at, cron, and crontab]: 630_crontab_at_job_scheduler.html [Users and Groups - /etc/passwd, /etc/group, su, sudo, chsh, useradd, gpasswd, etc.]: 700_users_and_groups.html [Unix/Linux Partitions and File Systems - fdisk, mkfs, mount, swap]: 720_partitions_and_file_systems.html [List of Commands You Should Know]: 900_unix_command_list.html [Video Tutorials on Lynda.com]: 910_lynda_index.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 [The VI (VIM) Text Editor]: 300_vi_text_editor.html [179 Practice Test #3 questions]: practicetest3.pdf [Practice Test README]: PRACTICE_TEST_README.html [GNU Diffutils]: http://www.gnu.org/software/diffutils/ [Description of Output]: https://www.gnu.org/software/diffutils/manual/diffutils.html#Detailed-Normal [Unix Shell I/O Redirection (including Pipes)]: 200_redirection.html [GeekWire]: http://www.geekwire.com/2014/net-turnaround-microsoft-finally-peace-open-source/ [Microsoft Blog]: http://blogs.msdn.com/b/somasegar/archive/2014/11/12/opening-up-visual-studio-and-net-to-every-developer-any-application-net-server-core-open-source-and-cross-platform-visual-studio-community-2013-and-preview-of-visual-studio-2015-and-net-2015.aspx [Future of VIM]: https://github.com/neovim/neovim/wiki/Introduction [NSA hunts System Administrators]: https://eff.org/r.yby9 [Take Notes in Class]: data/remember.jpg "Take Notes in Class" [Read All The Words by Alex and Colin]: ian_algonquin2014_read_all_the_words.jpg "Photo by Alex Lemoine and Colin Hough" [Plain Text]: week11notes.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/