Today I tried my first time doing scripting. I liked doing the scripting a lot and I believe it strengthened my decision in learning more in the programming field. At first i did have trouble starting with the logic and syntax that needed to be used to have the scripting work, but once I got used to it it was fairly easy.
Today I learned how to make a bot. I really liked the bot in several irc's that i've been in before by their interaction knowing it was just me talking to a computer. After figuring out how to download the phenny file to PuTTY and not my computer I felt comfortable using some scripting to give the bot more functionality.
Today I attempted to use the command “find” I had a lot of trouble using this command because i forgot about the STDERR (2>) and the path “/dev/null”. after wedge mentioned to me that it should help get rid of the errors from the output of “find” the command was very easy to use. This command along with grep work very nicely in finding files and words in those files.
Today in Unix Fundamentals I learned how to construct a website from using the PuTTY public.html directory. This interested me a lot in web design because I've always liked tinkering with websites even in my years at the Boces camput in Hornell. Maybe is programming isn't the thing for me I may take a direction in web design.
df locates all of the running directories used by a users system and each directories disk space usage.
lab46:~$ df Filesystem Size Used Avail Use% Mounted on /dev/xvda1 4.0G 2.5G 1.4G 65% / tmpfs 766M 0 766M 0% /lib/init/rw udev 738M 36K 738M 1% /dev tmpfs 766M 4.0K 766M 1% /dev/shm /dev/xvda2 248M 13M 223M 6% /tmp nfs:/home 2.8T 1.4T 1.4T 49% /home nfs:/lib/mail 2.8T 1.4T 1.4T 49% /var/mail lab46:~$
The who command shows who is currently logged on and if their messaging is on(+) or off(-).
Demonstration of the chosen keyword.
lab46:~$ who NAME LINE TIME IDLE PID COMMENT jjohns43 + pts/24 2012-01-23 12:18 08:45 701 (cpe-74-65-82-173:S.0) jjohns43 + pts/26 2012-02-29 14:40 old 21533 (cpe-74-65-82-173:S.1) thakes3 + pts/32 2012-03-16 15:39 03:44 6464 (:pts/8:S.0) wedge - pts/72 2012-04-01 09:42 00:32 10102 (telstar.lair.lan) tedmist1 + pts/74 2012-04-01 12:53 00:34 13120 (cpe-67-252-119-108.stny.res.rr.com) mfaucet2 + pts/87 2012-04-01 14:36 . 14073 (189.sub-166-248-14.myvzw.com) jjohns43 + pts/82 2012-02-27 11:03 08:45 26118 (cpe-74-65-82-173:S.0) jjohns43 + pts/93 2012-02-27 11:13 08:45 26196 (cpe-74-65-82-173:S.0) lab46:~$
The command “tty” prints the file name of the terminal connected to the standard input
lab46:~$ tty /dev/pts/87 lab46:~$
The “mesg” command without y or n displays whether messaging to the user is available. With mesg y mesg is turned on. With mesg n mesg is turned off.
lab46:~$ mesg is y lab46:~$ mesg n lab46:~$ mesg is n lab46:~$ mesg y lab46:~$ mesg is y lab46:~$
Stops a command from running.
lab46:~$ cat ^C lab46:~$
A directory where anything unneeded can be piped to.
lab46:/$ find / -name "hello" 2> /dev/null /home/mfaucet2/devel/hello /home/bkenne11/hello /home/bkenne11/devel/hello /var/public/unix/patterns/hello /var/public/unix/scripting/hello /var/public/cs265/hello /var/public/cs265/hello/hello /usr/share/doc/libtcltk-ruby1.9.1/examples/demos-en/hello /usr/share/doc/libtcltk-ruby1.9.1/examples/demos-jp/hello /usr/share/doc/tk8.4/examples/hello lab46:/$
gcc is a command that compiles code in C.
lab46:~/devel$ gcc -o test test.c lab46:~/devel$ ls test test.c lab46:~/devel$
The command “chmod” changes the permissions of a file or directory. This command is needed to make a script usable.
lab46:~/scripts$ ls guess.sh lab46:~/scripts$ ./guess.sh -bash: ./guess.sh: Permission denied lab46:~/scripts$ chmod -c 755 guess.sh mode of `guess.sh' changed to 0755 (rwxr-xr-x) lab46:~/scripts$ ./guess.sh hello lab46:~/scripts$
To learn more about how Unix functions and learn the commands to help make everyday work easier.
The easiest way to find out the functions of Unix is to play around with them. Some help with work that needs to be done and other help make the experience more enjoyable. All around Unix just helps makes doing things easier.
In order to help me achieve higher learning in Unix i will have to do the assignments for the Unix Fundamentals class. In order to do these I will have to be fully engaged in critical thinking and completely indulged in the work that needs to be done.
After following my method of achieving higher learning in Unix I have now understood the most recently due assignments after learning how Unix commands work. To achieve this I did what my method said and have handed in my assignments on time.
The keywords in the above part of the opus are commands that I have become more familiar with and are more comfortable using those commands without making a huge mess in my virtual machine, like I was when the class first started out.
Can I run more then 1 command at a time?
None
I believe I should be able to run more than one command through the use of “;”
I am going to show what is in the current home directory, make a file, show the file made in the home directory, then remove the directory all at the same time, without using a script.
lab46:~$ ls;touch file;ls;rm file;ls Maildir devel messaround phenny public_html scripts compat labwork multifile phenny.tar.bz2 restart.sh src Maildir devel labwork multifile phenny.tar.bz2 restart.sh src compat file messaround phenny public_html scripts rm: remove regular empty file `file'? yes Maildir devel messaround phenny public_html scripts compat labwork multifile phenny.tar.bz2 restart.sh src lab46:~$
My hypothesis was correct and my hypothesis was applicable. There isn't more than I originally thought.
I discovered that if a user wants to run more than one command at a time, the use of “;” is needed to accomplish such task.
Can I access any other users home directory? And if not can I change those permissions?
None
I believe I won't be able to access any other users home directory because I am not the system administrator or the creator of that directory. Files that I don't have access to I won't have the permission to change the permissions.
I am going to use a random student's directory, besides my own, and see if i can access it through using the “cd” command. If I can not I will try to change that students permissions to 755 using “chmod”
lab46:/home$ cd mmatt -bash: cd: mmatt: Permission denied lab46:/home$ chmod -c 755 mmatt chmod: changing permissions of `mmatt': Operation not permitted lab46:/home$
My hypothesis was correct and applicable.
What I found out from the experiment is that because I do not have rights to open the directory I don't have rights to change my rights/permissions that doesn't belong to me using chmod.
Perform the following steps:
Whose existing experiment are you going to retest? Provide 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: