Unix

Published on July 2020 | Categories: Documents | Downloads: 12 | Comments: 0 | Views: 154
of 4
Download PDF   Embed   Report

Comments

Content

 

UNIX 1. Give a small introduct introduction ion to UNIX. UNIX is a family of multitasking, multi user operating systems that derive from the original AT & T Unix. Initially intended for use inside the Bell ystem. UNIX operat ope rating ing sys system tem pr provi ovides des sim simple ple too tools ls !hi !hi"h "h per perfor form m lim limite ited, d, !el !ell#d l#de$ e$ned ned fun"tions su"h as %ase me"hanisms for %ooting the "omputer, logging in, running appli" app li"ati ations ons,, sto stori ring ng and re retri trievi eving ng $l $les. es. UNI UNIX X is the $rst $rst por porta%l ta%le e ope operat rating ing system and !as !ritten in  language !hi"h paved !ay in using UNIX in a variety of platforms.

2. What are the types of UNIX you know? un olaris, 'NU()inux, *a" + X

. Name three parts of the UNIX operatin! system with a small description. •





 The kernel kernel  The kernel kernel of the UNIX is the heart of the operating system. It allo"ates memory and time to the programs and handles the $le stru"ture and "ommuni"ation %et!een %et! een the dier dierent ent parts of the "omputer system su"h as the key%o key%oard ard and the s"reen  The shell  The shell is an interfa"e %et!een the user and the UNIX ker kernel. nel. It resem%le resem%les s -dos %ox that /indo!s displays if you run the "ommand "md. /hen a user logs in, UNIX "he"ks their username and pass!ord and then starts a program "alled the shell. hell interprets the "ommands the user types and transmits them to the kernel to %e exe"uted.  The programs 0rograms are not part of the operating system as su"h, %ut they are logi"al se1uen se1 uen"e "es s of "om "omman mands, ds, dev develo eloped ped for imp implem lement enting ing spe spe"i$ "i$" " tas tasks. ks. The They y usually in"lude appli"ation soft!are running at the user end.

". #escri$e the importance of command shell. It is not possi%le to have a 'UI e1uivalent of all the possi%le things you "an do in a ommand )ine Interfa"e. ome things are dramati"ally faster to do !ith a "ommand line than !ith a 'UI. This espe"ially applies !hen you are a re !orking !ith servers or mainframes in an administrative "apa"ity "apa"ity.. A lot of administrative tasks

 

are many times faster !ith a "ommand line interfa"e 2)I3 "an save a huge amount of moving the mouse around and "li"king. )Is also re1uir re1uire e far less "omputer resour"es resour"es than 'UIs, so they are favored on servers %e"ause you !ant to reserve most of the "omputer4s horsepo!er for the servi"es it provides to users. In UNIX %ased operating systems 2like )inux or *a" + X3 the "ommand line is in"redi%ly useful. It ena%les users to have "omplete "ontrol of the operating o perating systems, and do very "ompli"ated tasks in a fe! keystrok keystrokes. es. )Is are also useful for operating "omputers remotely, %e"ause they use pra"ti"ally no %and!idth, !hereas 'UIs go%%le %and!idth like there4s no tomorro!. 5ou "an manage a do6en ma"hines !ith as many )I !indo!s from one 0 even on very slo! "onne"tions, %ut trying to maintain a do6en 'UI !indo!s "an easily "hoke a slo! net "onne"tion. 7or example, example, !ith a s single ingle UNIX "ommand, I "an "onne"t to an online data%ase, sear"h %y name for the sour"e "ode of an appli"ation, do!nload that sour"e "ode, $nd and do!nload all of its re1uired support $les, "ompile the appli"ation into a %inary $le made spe"i$"ally to run on my "omputer, and install the appli"ation.

%. What do followin! commands in UNIX do? Give an e&ample. •

pwd 2print !orking dire"tory3 8isplays the full pathname of pathname of the "urr "u rrent ent !orking dire"tory dire"tory in  in the standard output.. output 9x: ; p!d (home(!orkingdire"tory



 <n n= cl <  hanges to lo!er"ase all "hara"ters in a designated line of text. n # pe"i$es the num%er of lines of text to %e "hanged to lo!er"ase. 7ollo! the n argument !ith a spa"e.

 

echo +utputting a string. 9x:

 

date

; e"ho >Text>  Text  Text

 

8isplays(sets a system4s date and time. Also a useful !ay to output(print "urre "urrent nt information !hen !orking in a s"ript $le. 9x:



; date *on *ay ?@ ??:@?:? 08T ?@C

ls )ists $les and dire"tori dire"tories es !ithin the "urr "urrent ent !orking dire"tory, and admins "an determine !hen "on$guration $les !ere last edited. 9x:

 

; ls Dideos

8o"uments

*usi"

todo.txt

dire"tory3 y3 cd 2"hange dire"tor  Toggle  Toggle %et!een dir dire"tories e"tories "onveniently "onveniently.. 9x:: 9x

 

: :EE= " "d d ga gam mesE sENe Ne! ! 7ol olde derr :EgamesENe! 7older =

mv 2move3  The mv "ommand moves moves a $le to a dierent lo lo"ation "ation or rename renames s a $le. 9x:

 

mv one.txt two.txt  #renames the original $le Fone.txtG to Ft!o.txtG mv three.txt ~/Desktop  ~/Desktop  #m #mov oves es the the $l $le e Ft Fthr hree ee.t .txt xtG G to yo your ur de desk skto top p dire"tory %ut does not rename it. 5ou must spe"ify a ne! $lename to rename a $le.

rmdir 2remove dire"tory3 8eleting a dire"tory 9x:: 9x

 

; rmd mdiir dir dire" e"to torryn ynam ame e

rm 2remove3 8eleting a $le 9x:

rm $le

 



cat 2"on"atenate3 8isplaying the "ontent of a $le. It "an %e used to read, modify or "on"atenate text $les too. 9x:

; "at $lename

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close