Finding files – searching for files by name, size, use, modify time, etc.
Assignment #05 HTML will be out soon – using GLOB wildcard patterns, selecting files using GLOB, redirection and pipes. This assignment requires reading Shell GLOB patterns and Shell I/O Redirection and then doing Worksheet #04 HTML and Worksheet #05 HTML.
First, do the weekly readings on File System and Pathnames, Directories, and Finding Files, also listed above.
These worksheets require you to understand the weekly readings, above.
This assignment requires you to understand the material in the readings and the two worksheets.
Study the pathname questions in first Practice Tests and Answers for your upcoming Midterm Test #1 in Week 5.
For full marks, read the Test Instructions (all the words) before your midterm tests. Midterm tests and the final exam are closed-book, no aids (just like your job interview). You will be given scrap paper to write on, and you may write on the question sheet.
Put these test dates into your phone! Use the Algonquin Registered Name Game link to test your name before the test. I don’t answer questions about the instructions during the test.
First Midterm test: 45 minutes; in your one-hour lecture class at 3pm on Wednesday in Week 5 (February 14).
Second Midterm test: 45 minutes; in your one-hour lecture class at 3pm on Wednesday in Week 9 (March 21).
Midterm tests take place in your 50-minute lecture class, not in your lab period. Each midterm test is 45 minutes long and contains approximately 45 multiple-choice questions similar to those found in the Practice Tests posted under Practice Tests and Answers. You must write the test in the lecture class in which you are registered.
Midterm #1 takes place in Week 5 on Wednesday February 14 at 3pm in C346 in your scheduled lecture class (not in your lab period).
Weekly Notes 1, 2, and part of Week 3, including the readings.
Weekly web pages up to and including Finding Files.
The 150 questions in the (new) first practice test in Practice Tests and Answers.
This 150-question test PDF was updated on February 7. Refresh your browser to get the latest version, labelled CST8207 Winter 2018, containing 150 questions. Do not use the old 2017 test.
For full marks, you must read and understand the Test Instructions before you write the test. I don’t answer questions about the instructions during the test.
A new set of 150 practice questions, answers, and quizzes for the first midterm test is posted in Practice Tests and Answers.
Blackboard has some quizzes taken randomly from the first practice test in Practice Tests and Answers.
The practice test itself is not part of your course grade, but these quizzes are part of your course grade. Do the quizzes for marks.
This week, we learn how to use absolute and relative pathnames and then learn how to find files.
Draw File System Diagrams on paper to understand where files are when you do the worksheets, the assignments, and the tests and exams!
See the note in Assignment #03 HTML about drawing file system diagrams on paper. Do it!
See my online timetable for how to make an office appointment to see me if you want your account back.
You can tell whether a file system name is a directory or a file by using the file command or by looking for a letter d on the left in the output of ls -l. Ordinary files are indicated by a dash - character on the left. The first two output lines, below, are files. The last three output lines are directories.
The rmdir command will only remove an empty directory.
You know this from doing Section 5 of Worksheet #02 HTML.
How do you remove a directory and everything inside it? You know the answer from doing the Worksheets, especially Section 5 of Worksheet #03 HTML.
The copy command cp will not copy directories unless you use the right option. You know this option from doing Section 3 of Worksheet #03 HTML.
You learn this in Worksheet #03 HTML.
You will need to know this for Assignment #03 HTML.
mv cal.txt ../../ >cal.txt # WRONG: what is now in cal.txt ?
No example in any of the notes or worksheets ever uses redirection and cp or mv together. These commands do not produce anything on standard output that is worth redirecting. Usually, the commands produce no output at all. Do not use redirection with mv or cp.
If the assignment asks you to redirect the output into a file in a specific directory, then only the second answer above is correct. The first answer, using mv, will have the wrong pathnames in it.
No employer wants to pay you to type six commands when one will do the job. Work smarter, not harder.
No employer wants to pay you to type ten commands when one will do the job. Work smarter, not harder.
If a pathname doesn’t work, use ls to find out why. Usually it’s because you’re spelling it wrong. Use the TAB key and the shell will complete the pathname for you, with no spelling errors.
Don’t be this guy. No employer wants to pay you to type ten commands when one will do the job. Work smarter, not harder. Do the worksheets!
You can use the whois command on Linux to identify which country is responsible for an IP address, or use a Web Whois Lookup.
The Linux whois command is blocked from use at Algonquin College, except if you are on the CLS. You can’t use the whois command in your own Linux machines while you are on campus. Use whois on the CLS or do a lookup via the web interface instead.
[28/Sep/2017:23:57:19 -0400] "GET /?i=../../../../../proc/self/environ HTTP/1.1"
[10/Feb/2018:04:44:53 -0500] "GET /index.php?option=com_jimtawl&amp;Itemid=12&amp;task=../../../../../../../../../../../../../../../configuration.php HTTP/1.1"
[01/Apr/2018:23:35:23 -0400] "GET /wp-content/plugins/wp-ecommerce-shop-styling/includes/download.php?filename=../../../../../../../../../etc/passwd HTTP/1.1"
[02/Apr/2018:06:02:56 -0400] "GET /cst8207/17w/notes/data//wp-content/plugins/ibs-mappro/lib/download.php?file=../../../../wp-config.php HTTP/1.1"
[02/Apr/2018:06:02:57 -0400] "GET /cst8207/17w/notes/data//wp-content/plugins/s3bubble-amazon-s3-html-5-video-with-adverts/assets/plugins/ultimate/content/downloader.php?path=../../../../../../../wp-config.php HTTP/1.1"
The Apache web server blocked all the above attacks.