Mara's Fall 2012 Opus
After 10 years of trying to figure out what I want to be when I grow up, I've decided to abandon my career in social/health services in order to start over and explore the world of IT. Besides some light gaming here and there, I enjoy knitting, baking, and photography.
Just added this class, so I'm a little behind, but here goes!
In class today we covered the rest of the directories and began looking at Vi (pronounced “vee eye”). My number one complaint thus far is that I cannot stand the directional keys being hjkl. I could understand wasd, but no…I must now retrain my brain. I think this is a sign of things to come with Vi…
A bit more practice with Vi today! Here's a quick summary of some of the commands we learned along with what they do:
1G - goes tot he 1st line of an entire file, any number can be substituted for 1 to go to that specific line. $G will take you to the last line of the entire file.
U - Undo
O - Inserts a new line above your current line
o - inserts a new line below your current line
W - like w, but skips over punctuation
I - inserts at the beginning of the current line
A - inserts at the end of the current line
a - inserts at the current location
X - works as backspace
x - deletes the current character. This can be prefaced with a number as well
dw - delete character forward
dW - delete word forward
db/dB - delete character back, delete word back
dd - deletes an entire line (cuts it)
p - pastes below
P - pastes above
cw/cb/cW/cB - changes characters/words fowards and back
yy - copies an entire line into a buffer (yw, yb)
~ - capitalizes lower case characters, and changes capital to lower case
s - substitute: deletes and goes into insert mode
. - will repeat the last used command, but it must be a modification command!
/{letter/word} - searches for a letter or word
n/N - n will give you the next match, N will give you the previous match. These can be used with numbers as well.
pressing the shift key and : will enter you into extended command mode
here you can m = move or co = copy
:w will save a file to its current name
:w filename will save the file to a desired filename
:q will exit
:q! will exit without saving
:wq will save and quit
Right now, I think that remembering all of these commands is a bit difficult. However, with some practice I think it will start to sink in more.
We went over quite a bit today. Some of the things I still feel a bit shaky on are data streams and I/O redirection, but that just means I need to practice more (I'm sensing a theme in this class regarding practice). We were introduced to touch file, echo, cat file, here strings, and pipes (|). We also learned about grep, which means globally search for a regular expression and print. This searches for a pattern and then displays any matches. The example we used in class was /usr/bin/who | grep $USER ($ is a variable expansion operator). This showed us our login sessions.
Remember that 4 is just the minimum number of entries. Feel free to have more.
This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.
As an aid, feel free to use the following questions to help you generate content for your entries:
Remember that 4 is just the minimum number of entries. Feel free to have more.
Paths: Absolute and Relative
Paths specify the unique location of a file or directory by showing the root and the hierarchy of directories in which the file resides. For example, in the Lab46 file system, the path to get to the games directory is from the Lab46 root, to the user directory, followed by the games directory. This path would be written as “lab46:/usr/games”.
Paths may be absolute or relative. An absolute path is a path that points to the same file location in a file system regardless of the current, or working, directory (where the user currently is). A relative path is a path that points to the file location but is dependent on the working directory.
Examples:
/a/b/c/d is an absolute path, as it specifies the full location for the directory/file “d”.
Using the above example, if the user is currently in the /c directory, he/she could use /d as a relative path to get to d. However, if the user is currently in the /a or /b directories, typing /d will not direct him/her to d.
local host
Local host is the name given to your computer. Its ip address is 127.0.0.1 to the local network but for the outside network or internet it would have a different ip address. The ip address 127.0.0.1 is used for loopback. If you send out packets and get the same packets back using 127.0.0.1 it is loopback. People use it for setting up servers and finding a database.
/* * Sample code block */ #include <stdio.h> int main() { return(0); }
lab46:~$ pwd /home/USERNAME lab46:~$ /sbin/ifconfig lo lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:85935 errors:0 dropped:0 overruns:0 frame:0 TX packets:85935 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:17556111 (16.7 MiB) TX bytes:17556111 (16.7 MiB) lab46:~$ ping localhost PING localhost.localdomain (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost.localdomain (127.0.0.1): icmp_req=1 ttl=64 time=0.041 ms 64 bytes from localhost.localdomain (127.0.0.1): icmp_req=2 ttl=64 time=0.031 ms 64 bytes from localhost.localdomain (127.0.0.1): icmp_req=3 ttl=64 time=0.034 ms 64 bytes from localhost.localdomain (127.0.0.1): icmp_req=4 ttl=64 time=0.039 ms ^C --- localhost.localdomain ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2997ms rtt min/avg/max/mdev = 0.031/0.036/0.041/0.005 ms lab46:~$
What is the question you'd like to pose for experimentation? State it here.
Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.
Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.
State your rationale.
How are you going to test your hypothesis? What is the structure of your experiment?
Perform your experiment, and collect/document the results here.
Based on the data collected:
What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.