User Tools

Site Tools


opus:fall2012:cgaines:part1

Part Numero Uno

Entries

Entry 1: September 7th, 2012

Professor Haas showed and explained VI/VIM to the class:

  • Learned that is was created by Bill Joy and that it was the first full screen.
  • I learned how to navigate, enter text, and other commands.
  • VI is a visual editor which has a insert mode and command mode
  • Still trying to remember the commands, and understand which one is to be used when. But once I understand it I will be a genius.

Entry 2: September 19th, 2012

This day gimmeh was introduced and a little information on scripts:

  • Gimmeh a neat program notifying when assignments are due, and has a count down
  • I also learned how to view how many times I have logged in
  • Learned how to create and run a script, script file is known as logincnt.sh
  • System is starting to pick up with me a little more.

Entry 3: September 21st, 2012

Today we learned about Wildcards, to me seems very tricky stuff:

  • wild cards are the following
    • * - match 0 or more of any characters
    • ? - match 1 of any characters
    • [ ] - character class; match 1 of any of the enclosed characters
    • [^] - inverted character class; do not match 1 of any of the enclosed characters
  • wild cards are basically a search to help us find the information we are looking for
  • Wild cards also show how many of the files have what characters
  • I will have troubles remembering commands and I may not use much of this because I am rather the bad lazy type of person

Entry 4: September 28th, 2012

Learning more on shell scripting:

  • Commands on shell scripting in VI
    • Echo; to output information to the user
    • read; to input information from the user into a variable
    • $RANDOM; environment variable which gives me a whole bunch of ranged random whole numbers
    • if; statements enabling us to make boolean choices
    • fi; closing the statements of if
    • else; statement to contain the countering action
    • -eg ; equal
    • -ne ; not equal
    • -gt ; greater
    • -ge ; greater than or equal to
    • -lt ; less than
    • -le ; less than or equal
    • exit; force termination of script
  • we created scripts that would give random numbers that we try to guess and it would tell us “correct” “wrong”
  • Learned how to use the bc inside of the script to minimize the numbers
  • I may have a little trouble remembering the commands, but I think I would like to create a script that actually talks with me

Keywords

unix Keyword 1

File Removal

Definition

File removal also known as file deletion is a way of removing a file from a computer's file system.

The reasons for deleting files are

  Freeing the disk space
  Removing duplicate or unnecessary data to avoid confusion
  Making sensitive information unavailable to others

All operating systems include commands for deleting files (rm on Unix, era in CP/M and DR-DOS, del/erase in MS-DOS/PC DOS, DR-DOS, Microsoft Windows etc.). File managers also provide a convenient way of deleting files. Files may be deleted one-by-one, or a whole directory tree may be deleted.

References

  • Wikipedia
  • Professor Matthew Haas
  • Mr. Joe Oppenheim

unix Keyword 1 Phase 2

Variable (environment / local)

Definition

Environment variable - within the shell, a variable that is stored in the environment. Because the environment is inherited by all child processes, environment variables can be thought of as global variables. However, they are not strictly global, because changes made by the child are not propagated back to the parent. Local Variable - A variable that exists only within the scope in which it was created. For example. within the shell, a variable that is not part of the environment is a local variable.

References

  • Harley Hahn's Guide to Unix and Linux
  • Programming Logic and Design
  • Wikipedia

Experiment 1

Question

Using wild cards, how would it change my search by adding or taking out a character out of the string?

Resources

Using the skills, and information learned in class.

Hypothesis

My hypothesis, by just changing one character or adding one from the string typed will make a difference in the results.

Experiment

Using the command ???? to search for directories, then I will change one thing and then add one thing to see what the results are.

Data

I will be working in files in sbin

using the command: ls -d ???? Result: dump fsck halt ifup init mkfs rarp Changing the command to ls -d ???* the result: I received way to much Changing the command to ls -d ????? the result: blkid fdisk getty lsmod rdump rmmod route rtmon udevd Changing the command to ls -d ?????? the result: agetty depmod e2undo ifdown mke2fs nameif rtacct swapon wipefs cfdisk e2fsck findfs insmod mkswap reboot sfdisk sysctl

this gave me every word that was at least four letters, then a result I did not intend for, then every word that was a least five letters, then the next with words that had six letters.

Analysis

Based on the data collected:

  • My hypothesis is correct
  • No short comings. You have to be accurate with what you type to get the items you require

Conclusion

That by just changing or adding one character in a command string it will change the results from the previous string

opus/fall2012/cgaines/part1.txt · Last modified: 2012/12/13 02:39 by cgaines