Updated: 2015-10-14 16:47 EDT
touch
vi/vim, nano
head, tail
cat, more, less
head, tail
mkdir
mv
(including using ..
)cp
rm, rmdir
find
using “wildcard” (GLOB) patterns - same as shell GLOB.bash_history
fileCheck the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant.
Form a small study group to do the worksheets. Each person tries the example given, and you make sure you all get the same answers. Worksheets teach you how commands work. Worksheets are not for hand-in; they are not worth marks.
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.
PS1, cd, find, less, ls, man, mkdir, passwd, pwd, rmdir
cat, clear, cp, find, grep, history, less, man, mv, rm, sleep, touch
alias, sum, unalias
vim
vimtutor
program on the CLS.Read the Test Instructions (all the words) before your midterm tests.
Tests take place in class in your one-hour lecture hour, not in your lab period.
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 scp
program.
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!
rmdir
command will only remove an empty directory.
cp
will not copy directories unless you use the right option. (You know this option from doing Section 3 of Worksheet #03 HTML.)Number of locked out IP addresses and attempts to use locked-out IP addresses in /etc/hosts.evil
:
$ wc /etc/hosts.evil
$ fgrep -c 'refused' /var/log/auth.log
$ fgrep 'refused' /var/log/auth.log | less
Count the unique locked-out addresses and show the top twenty:
$ fgrep 'refused' /var/log/auth.log | awk '{print $NF}' | sort -u | wc
$ fgrep 'refused' /var/log/auth.log | awk '{print $NF}' \
| sort | uniq -c | sort -nr | head -n 20
Password failures:
$ fgrep -c 'Failed' /var/log/auth.log
$ fgrep 'Failed' /var/log/auth.log | less
Userid failures:
$ fgrep -c 'input_userauth' /var/log/auth.log
$ fgrep 'input_userauth' /var/log/auth.log | less
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 Linux command in your own Linux machines on campus. Use it on the CLS or use the web interface instead.)
I told you not to use a blank userid in the file transfer program:
Sep 19 17:05:04 Invalid user from 99.224.109.142
Sep 19 17:05:18 Failed password for invalid user from 99.224.109.142
Sep 19 17:05:41 Failed password for invalid user from 99.224.109.142
Sep 19 17:05:49 Connection closed by 99.224.109.142
Sep 19 17:06:01 Invalid user from 99.224.109.142
Sep 19 17:06:24 Failed password for invalid user from 99.224.109.142
Sep 19 17:06:42 Failed password for invalid user from 99.224.109.142
Sep 19 17:06:46 Connection closed by 99.224.109.142
Sep 19 17:07:28 refused connect from cpe00fc8d413af3-cm00fc8d413af0.cpe.net.cable.rogers.com (99.224.109.142)
Sep 19 17:07:58 refused connect from cpe00fc8d413af3-cm00fc8d413af0.cpe.net.cable.rogers.com (99.224.109.142)