Updated: 2015-01-29 02:36 EST
cat, more, less
findusing “wildcard” (GLOB) patterns - same as shell GLOB
Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant.
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.
Read the Test Instructions (all the words) before your first midterm test.
Tests take place in your 8am lecture hour, not in your lab period.
Take notes in class! Your in-class notes would go here.
This week, we learn about using pathnames, especially relative pathnames.
This week, we learn about finding files.
fgrep -c "refused connect" /var/log/auth.log
Another Multitasking Fail Article:
Each time we dispatch an email in one way or another, we feel a sense of accomplishment, and our brain gets a dollop of reward hormones telling us we accomplished something. Each time we check a Twitter feed or Facebook update, we encounter something novel and feel more connected socially (in a kind of weird, impersonal cyber way) and get another dollop of reward hormones. But remember, it is the dumb, novelty-seeking portion of the brain driving the limbic system that induces this feeling of pleasure, not the planning, scheduling, higher-level thought centres in the prefrontal cortex. Make no mistake: email-, Facebook- and Twitter-checking constitute a neural addiction.
To improve CLS security, I’ve disabled the writing or changing of files on the CLS by the SFTP service, as used by file transfer programs such as WinSCP and FileZilla. You can copy files out of the CLS (e.g. your assignments) using WinSCP and friends, but you can’t copy files into the CLS unless you use the secure
Your time as a student is valuable. If you come up against a tough problem and make no progress in fifteen minutes despite best efforts:
This happens to all of us, and we need to watch out for it when it happens.
But what about when it’s midnight before the assignment is due?
Remember the “Don’t Leave Things to the Last Minute” rule!
When you use a file transfer program, remember that the program must use your userid to log in and not a blank userid. Someone got their IP address locked out of the CLS yesterday for using a blank userid:
Jan 21 20:36:31 Accepted password for XXXXXXXX from 184.108.40.206 Jan 22 01:42:38 Invalid user from 220.127.116.11 Jan 22 01:43:05 Failed password for invalid user from 18.104.22.168 Jan 22 01:43:15 Failed password for invalid user from 22.214.171.124 Jan 22 01:44:07 Invalid user from 126.96.36.199 Jan 22 01:44:37 Failed password for invalid user from 188.8.131.52 Jan 22 01:44:52 Failed password for invalid user from 184.108.40.206 Jan 22 01:46:40 refused connect from cpe0c473dc25fe1-cm0c473dc25fe0.cpe.net.cable.rogers.com (220.127.116.11)
Remember your password, and use the correct userid:
Jan 10 15:46:52 Failed password for XXXXXXXX from 18.104.22.168 Jan 17 21:31:54 Invalid user steam from 22.214.171.124 Jan 17 21:54:21 Invalid user desktop from 126.96.36.199 Jan 17 22:14:39 refused connect from cpe001ec92c1d15-cm84948c4813b0.cpe.net.cable.rogers.com (188.8.131.52)
Commands are usually VERB and OBJECT:
$ wc /etc/passwd $ cat /etc/passwd $ less /etc/passwd
Commands in worksheets 2 and 3:
PS1, cd, find, less, ls, man, mkdir, passwd, pwd, rmdir
cat, clear, cp, find, grep, history, less, man, mv, rm, sleep, touch
Read All The Words:
From: a CST8207 student Hey, was just playing around with "mv" command as per weekly notes "9 Relative Pathname Exercise" kept getting error "-bash: $: command not found" after trying to rename a .txt file. example: -bash-4.2$ $ mv caltest.txt catltest2.txt bash: $: command not found Just wondering if I'm doing something wrong and if so where would the information pertaining to this be?
In the Week 2 Notes, under heading “2-1 Readings, Assignments, Labs, Tests, and ToDo”, (the list of things you needed to read last week) is this web page: “3. The Unix/Linux Shell – using the shell command line in Linux” and in that web page is the heading “2 Typing Command Lines”, which is the information you need to Read All The Words, especially the sentence that starts with “You do not”.
Using chains of parent directories such as
../.., people attack web servers, trying to get access to sensitive files.
Someone in Kitchener tries to find a list of VMware hosts on my home machine:
$ zfgrep ../.. /var/log/apache2/*gz /var/log/apache2/access.log.8.gz:2014-11-27_03:52:57 184.108.40.206 220.127.116.11 - 192.168.2.250 idallen-oak.home.idallen.ca 69-165-154-175.dsl.teksavvy.com "GET /sdk/../../../../../..//etc/vmware/hostd/vmInventory.xml HTTP/1.1" 404 327 "-" "Mozilla/5.0 (compatible; Nmap Scripting Engine; http://nmap.org/book/nse.html)" 223 530 "/var/www/html/etc" 0 3672 FMT=idallen2 /var/log/apache2/other_vhosts_access.log.8.gz:idallen-oak.home.idallen.ca:80 18.104.22.168 - - [27/Nov/2014:03:52:57 -0500] "GET /sdk/../../../../../..//etc/vmware/hostd/vmInventory.xml HTTP/1.1" 404 530 "-" "Mozilla/5.0 (compatible; Nmap Scripting Engine; http://nmap.org/book/nse.html)"
Author: | Ian! D. Allen - firstname.lastname@example.org - 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/
Author Ian! D. Allen