% CST8207 Week 07 Notes - PATH, Quoting, Inodes, Hard Links, and ln % Ian! D. Allen - idallen@idallen.ca - www.idallen.com % Winter 2013 - January to April 2013 - Updated Wed May 8 21:01:24 EDT 2013 Readings, Assignments, Labs, and ToDo ===================================== - Fill in your [Course Evaluation Survey] for this course. Only nine questions! Closes March 17. - Read (at least) these things (All The Words): - [Week 07 Notes HTML] - this file - ** Read All The Words ** - optional: [Using find -exec or xargs to process pathnames with other commands] - [Shell search PATH - finding and running commands] - [Unix/Linux Shell Command Line Quoting Mechanisms] - [Unix/Linux File System - directories, inodes, etc. (correct explanation)] - [Hard links and Unix/Linux file system index nodes (inodes)] - [List of Commands] - From “Unix for Mac OS X Users” at [lynda.com] - more to come - Read (All The Words), Do, and save (not for hand in) - [Lab Worksheet #05 HTML] - optional BONUS VIM worksheet and assignment: [Lab Worksheet #06 ODT] [Lab Worksheet #06 PDF] [Lab Worksheet #06 HTML] - Read (All The Words), Do, and then Submit via Blackboard: - [Assignment #05 HTML] - GLOB, aliases, options, and start-up files - optional BONUS VIM assignment: [Assignment #06 ODT] (optional) - Write down the dates of your Final Exams from the [Course Home Page]. Midterm Test #2 - Week 10 - Thursday March 21 - 25% ==================================================== - Midterm test dates are posted on the [Course Home Page]. - For full marks, you must read the [Test Instructions] before the test for important directions on how to enter your answers, your lab section number, and the test version number on the question sheet and the mark-sense forms. - There may be more questions on the test than you can answer in the time allowed; answer the ones you know, first. From the Class Notes link on the Course Home Page ================================================= - Review last week. Did you do everything assigned last week? - Your Final Exam schedule is posted in the ICT office and on the [Course Home Page]. From the Classroom Whiteboard/Chalkboard ======================================== - Your in-class notes go here. - Due date of [Assignment #05 HTML] - Take the poll ID 118 86: - See the results: - Only about one third of the class requested an extension; no extension. - Use the BONUS labs to make up any missed marks. - Fill in your [Course Evaluation Survey] for this course. Only nine questions! Closes March 17. - Wed Feb 27: Expected 90 responses, received 9 `10%` Some Commands ============= Keep a notebook with a [List of Commands] in it: The command that creates new names for existing files is `ln` (link): $ ln source target Know the meaning of each of the output fields of `ls -dils`: 2 4 drwxr-xr-x 24 root root 4096 Sep 12 12:12 / 2883589 4 drwxr-xr-x 2 root root 4096 Oct 5 02:05 /bin 2883666 104 -rwxr-xr-x 1 root root 105776 Feb 23 2011 /bin/ls 2883587 12 drwxr-xr-x 186 root root 12288 Oct 17 13:38 /etc 2889578 4 -rw-r--r-- 1 root root 2209 Mar 19 2012 /etc/passwd 1. inode number 2. size in disk blocks 3. (one char) type (file, directory, symlink, etc.) 4. (9 chars) permissions (3 for user, 3 for group, 3 for other) 5. link count (count of names for this inode) 6. userid of owner 7. userid of group 8. size in bytes (characters) 9. date last modified 10. name If two names reference the same inode, all the above attributes (except the name) will and must be identical for the two names. All the above attributes, except the name, are stored with the inode itself. The names are stored in directories. I’ve been telling you some simplification lies ---------------------------------------------- - Lie: Names are stored with the things they name. - Truth: Names and inode numbers are stored in directories. - Lie: the `rm` command removes files. - Truth: The `rm` command only removes **names**. When all the names are gone, only then are the file data blocks released. - Lie: All file system objects have a unique inode. - Truth: All things *on the same file system (disk partition)* have a unique inode. Different file systems have separate disk space and inode trees, so the same inode number will mean different file system objects in *different file systems*. You can’t hard link objects between different file systems. (Use symbolic links instead.) Real Sysadmin Work ================== - Linux Jobs: - - - [Texas] (WARNING: posting created with Microsoft Office) - Job posting requiring you to [Read All The Words]  ![Read All The Words][1]  ![Learn] -- | 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 [Course Evaluation Survey]: https://coursefeedback.algonquincollege.com/etw/ets/et.asp?nxappid=WCQ&nxmid=start [Using find -exec or xargs to process pathnames with other commands]: 185_find_and_xargs.html [Shell search PATH - finding and running commands]: 400_search_path.html [Unix/Linux Shell Command Line Quoting Mechanisms]: 440_quotes.html [Unix/Linux File System - directories, inodes, etc. (correct explanation)]: 450_file_system.html [Hard links and Unix/Linux file system index nodes (inodes)]: 455_links_and_inodes.html [List of Commands]: 900_unix_command_list.html [lynda.com]: https://lyceum.algonquincollege.com/Lynda [Lab Worksheet #05 HTML]: worksheet05.html [Lab Worksheet #06 ODT]: worksheet06.odt [Lab Worksheet #06 PDF]: worksheet06.pdf [Lab Worksheet #06 HTML]: worksheet06.html [Test Instructions]: 000_test_instructions.html [Texas]: data/job.html [Read All The Words]: http://www.shopify.ca/careers?posting=ecommerce-consultant-guru [1]: data/lesen_sie.jpg "Read All The Words" [Learn]: data/learn.png "Learn" [Plain Text]: week07notes.txt [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/