On this day, the class logged into Lab46 while setting up our password's and explored the class syllabus.Somewhat apprehensive about this class, since I don't have an extensive amount of knowledge when it comes to dealing with computers.
Downloaded PuTTY onto my personal laptop and explored Lab46.
The class logged into Lab46 and set up screens where we joined the unix and lab46 chats.
This mainly concluded the day, with the request that we check out Lab46 more.
Set up our mercurial repositories and learned how to check our lab46 mail, through the prompt alpine. Then we went through our basic commands and learned that the “~” indicates home directory and the “$” indicates a regular user, while a “#” indicates a super user.
On this day there was quite a bit of exploring, which was very beneficial for me since I didnt really know a ton of the inner workings, including many of the files that exist in lab46
I personally must get more used to file manipulation and have tried doing more work that i have to do through CLI's and exploring unix
We where given the command status today so we could access how we are doing in class. This command is based on our projects and attendance. The attendance is based on day of the year instead of months and days since it is difficult to parse specific dates. Next, we where given the command cal where we can access calendar and dates. There are many different variations we can do of this command that can give us different results; check under man cal for more info. The cool part about this is we can even see the switch of the Julian calendar to the Gregorian. The seconds count in unix are based on the time unix began or as Matt said, “When time began” which was December 31, 1969 - January 1, 1970. Also given command pom. “Phases of the Moon” command: cd pts tty = terminal number we're in, cd pts mesg = accessible to sending messages.
Talked more about the inner workings of unix, all things run with a library, there are different types of passwords =shadow. SInce unix is based on files it is very organized so one can easily isolate things and where problems are.
Due:9/17/14
Due: 9/24/14
Since tar is an older command its main function was to create one file out of many, which is optimum for us when we need to create a zip file. Instead of creating many different zip files, tar allows us to create one large file that can be compressed.
Command:submit unix allows us to check for submitted assignments
ASCII whitespaces are characters that are not visualized such as backspace or transmit off(XOFF, ctrl+s) and transmit on(XON, ctrl+q). The importance of this is if one uses certain commands it could result in these whitespaces to try and be implemented therefore we learned some other commands.
When we converted a small section of the hexadecimal info, our class noted that the lettering was flipped. This is where we discussed Endianness; big and little. Big Endian is typically used by intel and reads it analytically from right to left, while Little Endian is the opposite. At first this was a little odd to me but started to make sense when i thought of it analytically, this was significant for me because if i was ever trying to get the right information from hexadecimal i better realize which endian it is or be completely confused.
In class, we talked about the commands; less and more. Both of these commands show pages of certain text's however less shows us one page at a time and allows us to scroll through it. Less is more!
We then created a file that had 57 lines on it and went through a process of trying to put the first 19 lines into a file called section 1, the last 19 into a file called section 2, and the middle lines into a file called section 3. to do this we used the commands; head and tail. the commands to figure this out was:
cat -n who.dat | head -n19 > section1
cat -n who.dat | tail -n19 > section3
cat -n who.dat | head -n38 | tail -n19 > section2
Next, we used the command; sort. This allowed us to sort each section together correctly
cat section2 section1 section3 | sort | less
Then we discussed the commmand; getent. which we used in getent passwd which displayed our own passwords /etc/passwd. We noticed that our passwords used to be stored here however when computers got faster at decrypting passwords, they replaced this with an x so its not as readily available.
First thing in class we discussed fork bombs or denial of service and how they can really do a number on the servers. However, to keep this from happening we can limit how many processes a user can have, therefore if they set off a fork bomb only they would be locked out from their shell. command ulimit allows us to adjust our own processes so we can allocate certain amounts of processes to certain areas.
we also saw dinosaurs with hats!
In class we discussed about quotes: ' =which is the full quote or literal quote : =half quotes, allow for expansion(variable) ` =backquote,backtick, command expansion
We also discussed how one can create their own variables:
uol=$(/usr/bin/who | wc -l) echo "There are $uol users on the system"
-remember for next class; wildcards.
uniq tr sed These commands are going to be crucial for the next project, Dataproc
man man: allows one to check the man page of man which has some valuable assets, such as man 7 ascii which displays an ascii table.
-watered down forms of regular expressions
?
matches any single character
*
match zero or more of any character
[]
match any one of the enclosed characters
[^ ]
do not match any one of the characters enclosed
ls -d | wc -w
the -d function of ls keeps the ls function from opening directories and listing everything within Wildcards- can do ranges[0-9] and multiples but don't allow any commas within just add them, [0-9 a-z A-Z]
ZOMBIES EXIST!!!!!!
To Help Combat Zombies and other system problems we need to be able to see our process while we're using it. Therefore we used the command ps that allows us to see our PID From here we can also use kill to end processes.
kill -l
Internal bash - ctrl z freezes running processes
lab46~$ alias bob='echo bang'
: this manually sets alias
After we played around with alias in class, we then went and wrote some shell script files with bash. I don't have much experience with bash so I hope we get more involvement with it so i can learn much more, this is definitely my weaker side.
Wildcards are used on files while regular expressions are used with text in the files.
way of manipulating text to fit ones needs, it groups text together using multiple \( \) for each fields which then corresponds to a number starting at 1; by listing these numbers at the end however one needs, sed will manipulate it.
lab46~$ status unix|grep 'opus'|sed 's/^.*\([01]\):\([a-z][a-z]*\):\(week\)\([0-9]\)\(.*\)$/\5 for \3\4\2[1]/g'
at 16:16 enter ls > out enter ctrl d at rm⇒ remove atq ⇒ shows which commands are scheduled
cron ⇒ similar to at except can be done every certain number of days
New project Time Online: write script that returns the amount of time one has spent on Lab46
Worked on our new project time online script the entire class, honestly don't know how to start this one it seems kinda tricky.
As an aid, feel free to use the following questions to help you generate content for your entries: