Operating Systems CECS 326
Popular in Course
Mrs. Tianna Leannon
verified elite notetaker
Popular in Computer Science and Engineering
This 2 page Class Notes was uploaded by Zackary Cronin on Monday October 5, 2015. The Class Notes belongs to CECS 326 at California State University - Long Beach taught by Staff in Fall. Since its upload, it has received 20 views. For similar materials see /class/218756/cecs-326-california-state-university-long-beach in Computer Science and Engineering at California State University - Long Beach.
Reviews for Operating Systems
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/05/15
CECS 326 Operating Systems Below are some commonly used UNIX commands and their sample use Try them out and understand what happens when each executes Look up the man page by using the man command for each command and learn the details man ls display online manual of the ls command try to nd manuals for other commands who show who39s logged in whoami display your username nger s lam display shortform information on all users named lam try other names cal 09 1972 display a calendar of the month 09 in year 1972 try other and no monthsyears date display the current date and time passwd request to change password ls display current directory ls 1 display current directory in long form ls 71a display all les including hidden les in current directory in long form mkdir htdocs create a directory named htdocs in the current directory mkdir htdocscecs326 create a directory named cecs326 in subdirectory htdocs chmod aX htdocs htdocscecsj 26 cd htdocscecs326 mkdir lab0 cp background html lab0 ls 71 lab0 cd lab0 cp background html temp Vi temp cat temp cat gt prolog cat prolog temp gt combined more combined mv combined comb chmod gw comb change permission to allow all to access subdirectories htdocs amp cecs326 change current directory to htdocscecs326 create a directory named lab0 in the current directory copy le named background html in current directory into lab0 show detailed content of subdirectory lab0 change current directory to lab0 copy le named background html to temp edit le temp using vi display content of le named temp request to have lines typed after this command funneled into le named prolog use controld to end typing try key in 20 short lines then controld to terminate concatenate les prolog and temp into a new le named combined Warning NEVER use command of the form cat f1 7 gt f Content off will be lost display content of combined one screenful at a time rename le combined to comb MAKE SURE you don t have an old le with this name change access mode of comb to add quotwritequot permission to group user my comb move le named comb into parent directory cd change current directory up one level to parent directory ls display current directory Make sure that lab0 is in the list nndir lab0 remove directory named lab0 watch the response and gure out why pwd print working directory MAKE SURE you are in the cecs326 subdirectory rm i lab0 remove all les in the lab0 subdirectory but check with me before removing nndir lab0 remove directory named lab0 compare response this time with your previous attempt rm comb remove le named comb which should have been moved here history display a list of commands you have executed to now this history allows you to rerun commands as follows I repeat the command I just did Ic repeat the most recent command that begins with c 3 repeat the command that I did 3 commands before this wd repeat the most recent command that contains pattern quotwdquot telnet linuXXXX telnet to another linuX machine XX represents a 3digit number on the linuX machines in our linuX labs hostname display hostname of machine I am using Dr Shui Lam CECS 326 Operating Systems vi is a native screen editor available on every Unix implementation Learn the following vi commands by creating and editing a simple program file named worldcpp within your cecs326 subdirectory The file should contain the typical hello world C program Then complete the exercise with the following steps 1 Compile the C program into an object file named worldo 2 Link the object file into an executable file named world 3 Run the executable file world Vi lename to enter editor with existing or new le named lename To get out use one of the following ZZ save buffer and exit q quit without saving buffer w write buffer over le wq write buffer over le and exit Cursor control go to line k text text forward or backward search for the given text Arrow keys to move cursor to scroll the screen forward and backward respectively To insert text ESC to end insert i to insert text at the current cursor position 0 or O to open up a blank line below or above respectively the current line for the insertion I A to insert text at the beginning or the end respectively of the current line To delete text nx nX delete next or previous n characters respectively delete 1 character if n is omitted D delete to end of line J join next line ndw ndb delete next or previous n words respectively ndd delete n lines starting from the current line delete 1 line if n is omitted dG delete the current line through end of le z39jd delete lines itojj must be 2 i Use quotquot to indicate the line at the end ofthe le quotquot for the current line and quotkquot for current line minus k d delete the current character through end of line d delete the current character through end of sentence dtchar delete the current character up to char in current line ckw change away k words forward Cut and paste z39jmk move lines ithrough j to after line k kdd cut k lines from the currrent line then move cursor to a new position then type p or P paste the k lines cut above to after or before the line of the new cursor position Dr Shui Lam
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'