Quinton “The Awesome” Clark's Opus
\m/
My name is Quinton Clark and I love videogames, Warhammer 40k, and food. I'm a huge metal head but I listen to other things as well. Like dubstep for example. I love it. I am also a big art student. I'm always looking for cool things on deviantart. Concerning videogames i love RPG's and FPS's, as well as RTS's and racing games. I extremely dislike sports games unless its twisted up like Warhammer's Bloodbowl. I'm a 90's kid so I love alot of the older shows and movies. The 90's kicked ass man. Anywho i need to extend this introduction so here we go. Once upon a time there was a magical land called Altruem. In this land there was an evil knight by the name of Quintonius. His heart was blacker than the devil's and he had more power than the gods themselves. He had his own kingdom with his loyal evil subjects and wenches. Many tried to conquer his land but his armies smote them down. His armies, they say, were cursed to ferever fight for their lord. People say they were armies of the dead that would not die. Beside his armies were his great beasts of death. All treacherous kinds that you could imagine: from behemoths of the land to the leviathans of the sea, to the dragons of the sky. He was an unstoppable force. And no one could stand against him.
On this day i had experienced more of what one might call a simple text editor. But this text editor was not your ordinary text editor you see. This text editor was greater then your common text editors such as Microsoft Word. I can see but what i have said that you are in pure disbelief. But what i say is true. Behold, VI! The vi text editor is one of the greatest tools in the known and Linux/Unix universe. There are many commands to this text editor, but if you practice these commands you will be able to harness the skills of VI. I look forward to learning this. VI will be just so much more helpful and quicker than Microsoft Word. I WON'T HAVE TO USE THE MOUSE!!! But like i said before i have to practice the commands before i can become a master like the Great Haas.
Today in Unix/Linux we learned about process id's (PID). They are basically a small id for any process that happens to be running. So anything you are doing at that moment has a PID. With that you can go in and maniupulate it in some way. Thats when we learned the kill commands. We take the PID of the process we want to kill and we just kill it with a any kill command that we want. There are numerous kill command options but 'kill -9' is the deadliest of them all. It's basically the equivalent of dropping a NUCLEAR WARHEAD on the command you do not want existing anymore. We also learned that there is such thing as zombies in the UNIX/Linux universe (not to say that there aren't zombies in the human plane of existence.) Expected zombies we can take care of but an unexpected zombie is something we do not want period. So we learned how to make expected zombies, find processes with any specifics and a little more on the VI editor.
In linux today we learned shell scripting. You basically run the system from the outside instead of the inside. We wrote some simple scripts, for example one will ask for our name and say a message. Then another one asks for a password. Either the password was in the script or it called another file with the password we wanted. We learned what we needed to do, what means what like # stands for a comment. #! this is a shhh bang! And we made them executable with a new way of changing permissions. He gave us one more program which took any files in a directory and got rid of any extensions and made them all just regular files, no extensions.
Today we worked on our first project called FILESYSTEM SAFARI. Haas pretty much put this in our projects so that we could get started on them because everybody is lazy in the class (guilty). Any-who, the project is still underway, it isn't too hard but it is cumbersome. It's taking a bit of time to finish it.
Localhost is the standard hostname given to the address of the loopback network interface. The name is also a reserved top-level domain name set aside to avoid confusion with the narrower definition as a hostname.
A Home directory is a file system directory on a multi-user operating system containing files for a given user of the system.
A Regular File is the simplest of files being a read only file.
The Directory is the most common special file. The layout of a directory file is defined by the filesystem used. As several filesystems, both native and non-native, are available under Unix, there is not one directory file layout. Within a directory you can store many files or other directories.
A Special File cannot be regularly accessed through basic means. It has to be opened with a certain command. Some special files include Socket Files and Device Files.
File Listing can be carried out by the ls command. If there you want to find out more about the ls command you can look up its arguments in its manual pages.
lab46:~$ ls Desktop age.sh burninator.c hello.c public_html Documents archive1.tar closet hello.s shell Downloads archive2.zip data lab1.text src Maildir archives extravagentpiranha list-basedloop.sh tmp Music ascii file.txt motd trog3 Pictures badname filecreat.sh numericloop.sh trog3.c Public badname.tar guess1.sh password unix.text Templates bin hellisharmadillo prog2 Videos burninator hello prog2.c
Copying Files is carried out by the cp command. However, in order to fully copy a file to a new area you have to type the file you want and then type the area you want it to reside in.
lab46:~$ cp burninator bin lab46:~$
Creating a file requires the touch command. When you touch a file that you have just named it creates it in the current directory you are in.
lab46:~$ touch file1 lab46:~$
Removing a file requires the rm command. When you type rm make sure you type the file you want removed and that you are in the directory in which it is located. After that you will be prompted with a question for removing the file because Unix cares.
lab46:~$ rm file1 rm: remove regular empty file `file1'? y lab46:~$
There are 3 different Permissions for files:
Of course these permissions can be turned on/off for each class by the user who created the file in the first place. These permissions are indicated by 'r' for Read, 'w' for Write, and 'x' for Execute.
-rwxr--r-- 1 qclark lab46 202 Sep 27 14:33 extravagentpiranha -rw-r--r-- 1 qclark lab46 52 Mar 25 2011 file.txt -rwx------ 1 qclark lab46 201 Apr 29 16:50 filecreat.sh -rwx------ 1 qclark lab46 1019 Apr 25 17:53 guess1.sh -rwxr--r-- 1 qclark lab46 365 Sep 27 16:41 hellisharmadillo -rwxr-xr-x 1 qclark lab46 6625 Oct 12 2010 hello
Tab Completion is a handy little trick if you feel lazy and don't feel like writing out you entire file. Just type the first few letters of the file and hit TAB, your file should appear automatically.
Moving a file requires the mv command. Type this command, then the file that you want moved, and then the location of where you want it move to.
lab46:~$ mv extravagentpiranha bin lab46:~$ lab46:~$ cd bin lab46:~/bin$ ls bin burninator corpseshark extravagentpiranha lethalbadger whitetiger
Familiarity with the structure of UNIX systems; what this objective entails is to have an understanding of things that correlate with the UNIX/Linux system.
One can demonstrate a basic knowledge and understanding of the UNIX system.
A measurement can consist of the topics and experiments that i have performed above.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
#!/bin/bash cd ~/tmp for file in `/bin/ls -1A ~/tmp`;do fname="`echo $file | cut -d'.' -f1`" mv -v $file $fname done exit 0
Is it possible to replace the -f1 with a -f2 and get that field instead?
My brain, curiosity, Matt Haas
I believe that if i change the f1 to an f2 then it will show me the field that occurs after the '.'
To test my hypothesis I shall replace f1 with f2.
#!/bin/bash cd ~/tmp for file in `/bin/ls -1A ~/tmp`;do fname="`echo $file | cut -d'.' -f2`" mv -v $file $fname done exit 0
lab46:~/bin$ ./corpseshark mv: `chimera' and `chimera' are the same file `derp.ent' -> `ent' mv: `dragon' and `dragon' are the same file mv: `filealpha' and `filealpha' are the same file mv: `filebeta' and `filebeta' are the same file mv: `griffin' and `griffin' are the same file `herp.txt' -> `txt' mv: `kraken' and `kraken' are the same file mv: `scorpion' and `scorpion' are the same file mv: `spider' and `spider' are the same file
Based on the data collected:
My hypothesis was correct!
In conclusion, with how many delimiters you have in the file you can choose and whatever comes before it or after are the fields. You can change the field you want by choosing the number that corresponds to where the field is.
Is it possible to do the same experiment above but instead taking more then one field out?
My brain, curiosity and Matt Haas
I believe that replacing the single number with a number-number, for instance 5-7, will take out those fields.
I am going to replace the current field with 5-7 and perform this action in the lab46 terminal.
#!/bin/bash cd ~/tmp for file in `/bin/ls -1A ~/tmp`;do fname="`echo $file | cut -d'.' -f5-7`" mv -v $file $fname done exit 0
lab46:~/bin$ ./corpseshark `file.herp.derp.nyan.cat.fyi.uti.txt.blops.fable.gears' -> `cat.fyi.uti'
Based on the data collected:
It works!
This conclusion is basically the same premise as the previous experiment. The only difference here is that you can take out multiple sections of fields.
Is it possible to only take out the exact fields you want out, even if they may be a few fields apart?
My brain and curiosity
I believe that i can take out only the fields i want by using 'commas'.
I'm going to type in the necessary actions in order to carry out my hypothesis.
#!/bin/bash cd ~/tmp for file in `/bin/ls -1A ~/tmp`;do fname="`echo $file | cut -d'.' -f1,3,6,8,9`" mv -v $file $fname done exit 0
lab46:~/bin$ ./corpseshark `file.herp.derp.nyan.cat.fyi.uti.txt.blops.fable.gears' -> `file.derp.fyi.txt.blops'
Based on the data collected:
It worked!
In conclusion we can take out any field we want as long as we know the actions to take them out. Otherwise it will yell at you
Today we went over regular expressions in class. We reviewed and played with basic regular expressions that one may encounter. I am starting to get a good feel for the regular expressions and with a little more practice, I should be fairly comfortable with using them. The biggest difficulty i can foresee with this is knowing precisely what I want to do with them but this is common for all new tools.
This week we learned some new things with regular expressions. Normally we would use a command like cut or grep to pick apart data and choose what we want to show. But with the regular expressions we were able to be even more precise in a more concise manner as well. They are a little hard to grasp because the concepts are kind of obscure, but for the most part i understand how they work. I just need to work with them more in my shell scripting or just in general like in my programs as well. We also did a script that will extract the data from our opus. It takes the total score you can get, the score you got and what percentage you recieve. We wrote that and added more on like cutting off the many decimal points after or similar stuff. We used some regular expressions in it as well which is really confusing but if i pick it apart piece by piece i can understand it.
Today we talke a little about wildcards and how to use them. I had read about them in in one of the books but had not played with them on my own. Today's class allowed me to see them in action. I see that they are very similar to regular expressions but with minor differences. The same basic principles applied to regular expressions can be applied to wildcards keeping in mind what symbols are used for what and when they can be used appropriatetly.
Today I brought in my laptop because there was an issue with java on it and i wanted to be able to run Minecraft. In case you didn't know Minecraft is a fantastical game where you can DO WHATEVER THE HELL YOU WANT!!!!! Sounds to good to be true right? Wrong. I myself am building an awesome Castle of Darkness. Anywho today we just worked on some more C programming which was not too difficult to understand.
A computer that resides in some distant location from which data are retrieved. It typically refers to a server in a private network or the public Internet.
The current directory is the directory in which a user is working at a given time.
lab46:~$
An archive is a collection of computer files that have been packaged together for backup, to transport to some other location, for saving away from the computer so that more hard disk storage can be made available, or for some other purpose.
lab46:~$ archive1
Compressing files give you more storage space when using your OS, because it condenses the file down. Compressing a file can involve certain file extensions such as: .tar .zip .gzip etc.
lab46:~$ badname.tar
In order to view files it depends on what type of file you want to view. You might have to use cd, cat, ./, etc.
lab46:~$ cat ascii
lab46:~$ cd closet
lab46:~$ ./burninator
This is the greatest text editor EVAR!
There are certain commands to enter Insert Mode, but once you are in this mode it will tell you at the bottom. And once here you can type out anything that needs to be typed as well as creating programs that can be run once you change the permissions.
~ ~ ~ ~ ~ ~ ~ ~ -- INSERT -- 0,1 All
This is the starting area when you create a VI text. In here there are keys that do specific actions that can help you in creating/editing what you want in your VI text.
~ ~ ~ ~ ~ ~ ~ "alpha" [New File] 0,0-1 All
The extended command mode begins with the colon : and from there you can add things like a number line or color. You can also save your work or discard when in this mode.
~ ~ ~ ~ ~ :q
The PATH environment variable is a colon-delimited list of directories that your shell searches through when you enter a command.
lab46:~$ echo $PATH /home/qclark/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
A wildcard is a symbol that takes the place of an unknown character or set of characters. These characters are: ?, *, [], [^ ]
lab46:~$ grep '^r.*$' *d
Job control facilities allow you to have the system work on a job in the background while you do something else at the keyboard.
The ability to accomplish/automate tasks.
State the method you will use for measuring successful academic/intellectual achievement of this objective.
Follow your method and obtain a measurement. Document the results here.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
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.
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.
If you're doing an experiment instead of a retest, delete this section.
If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:
Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.
Evaluate their resources and commentary. Answer the following questions:
State their experiment's hypothesis. Answer the following questions:
Follow the steps given to recreate the original experiment. Answer the following questions:
Publish the data you have gained from your performing of the experiment here.
Answer the following:
Answer the following:
Today in UNIX/Linux class we pretty much played with the video wall and being able to display objects and commands on other peoples monitors. First we had to find which server they were on and then we had to find out which computer they were at. This was generrally accomplished with the ssh command. After we found they're computer it was fun just to display random things on their monitor. What i thought was cool was that we display the object on the other persons computer but the whole process is still being performed by the person who is performing the action.
Today we worked on a lot on sed command implications. We took an html code and we were able to find certain lines and things within the code by using the sed command. The entire code was the course catalog for CCC. What we did was we typed in certain arrangment of characters and within those characters we could decide which ones we wanted to see first. It was easy because we just typed in a whole mix of things that were generalized to what we wanted to see and the computer just filled in the blanks for us and found out what we wanted to see.
Today in UNIX/Linux class we worked on the class finder from last class and worked on some more shell scripting shtuff.
Today i helped out a classmate for one of his projects that wasn't part of the UNIX/Linux course. It was pretty tricky because i had to use the file organizer. I had to add a lot of things to the file organizer to get rid of junk he didnt need and order the rest of the words into a way that he wanted.
Is what happens when you wipe a process from existence or you just stop the action. A favorite one is kill -9, which is basically the equivalent of an atomic bomb dropping.
lab46:~$ kill -9
Every command you give is a job that is executed. A job can be suspended, placed in the background, moved back to the foreground or terminated.
A background process executes independently of the shell, leaving the terminal free for other work. To run a process in the background, include an & (an ampersand) at the end of the command you use to run the job.
lab46:~$ bg
The foreground process is the program that the user is interacting with at the present time In order to foreground a process do this:
lab46:~$ fg
Signals represent a very limited form of interprocess communication. They are easy to use (hard to use well) but they communicate very little information. In addition the sender (if it is a process) and the receiver must belong to the same user id, or the sender must be the superuser. Signals are sent explicitly to a process from another process using the kill function.
The ability to execute more than one task at the same time, a task being a program.
A compiler is a computer program (or set of programs) that transforms source code written in a programming language into another computer language.
Code produced by a compiler or assembler.
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. Although C was designed for implementing system software, it is also widely used for developing portable application software.
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture.
A filter is a program that gets most of its data from its standard input (the main input stream) and writes its main results to its standard output (the main output stream). Unix filters are often used as elements of pipelines.
A computer program that takes one or more objects generated by a compiler and combines them into a single executable program
State the course objective; define what that objective entails.
State the method you will use for measuring successful academic/intellectual achievement of this objective.
Follow your method and obtain a measurement. Document the results here.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
Can you gunzip a regular zip file
None.
I hypothesize that gunzipping a zip file will not bode well.
I am just going to wing it and see if it works.
lab46:~$ gunzip omegafile.zip gzip: omegafile.zip: unknown suffix -- ignored
Based on the data collected:
I discovered that you can't really mix and match. You have to unzip zip files and gunzip gzip files.
Is it possible to block other users from displaying things on my screen?
My resources include but are not limited to: Matt Haas
I hypothesize that the command xhost will effectively carry out this action
I am going to type the command and have a friend try to penetrate my wall of solitude.
My screen:
lab46:~$ xhost - access control enabled, only authorized clients can connect
Other person's screen:
gnu:~$ export DISPLAY=flake03:4 gnu:~$ xeyes No protocol specified Error: Can't open display: flake03:4
Based on the data collected:
In conclusion you can block people from displaying images or files onto your monitor. You can also block specific or entire groups of people as well.
If you're doing an experiment instead of a retest, delete this section.
If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:
Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.
Evaluate their resources and commentary. Answer the following questions:
State their experiment's hypothesis. Answer the following questions:
Follow the steps given to recreate the original experiment. Answer the following questions:
Publish the data you have gained from your performing of the experiment here.
Answer the following:
Answer the following: