You are on page 1of 35
Snitroduction to Unix File Sy stem Unite file sys tem tr a Jo ‘tal method of of erganizin cand storin gees wna ak information in a waif that maker it easy to rook) ae F bin usr ib é me ‘ Gsystem files) ram) th brovits) Cuser ote ue = Cusp a... “(programs Pe pss vi stdioh hello. zs - path dor cp: /bin /ep UNIX Features Portable Multi users Csame resources, shareel by elifferent users) Multi tasking (each usen con execute many proc Networking Cexchange Enformac hon) Chuélt in) | Device Independence ized File System Utilities Ceommo nds) Services 1-08-20 Unix System Architecture - a wo Application 4 programs ART TT Sh ~ y Pg . \ \ env_\ A Pe NL eer A kernel pt . 1 tl ~ memory management ay ‘O. utility handling errdrs, interupl: al procees -allocoding ‘resources our requests - maintaining file sistem VI Editor [file tl 3 bype of editors ed - line “edilor en - advanced version of ed vi -sereen echlow commords vi filename - Create f no exule obhuwire ‘opens vie edfitename - 4.ODD Texr Command i- Before current location insert 1 - Ad the begining of curred mat commands ao - Append alter curcol Append 0 - Appencl at the end commands 0 - Adel After line O- Add Before line & Cursor Move Gmmanclt + To edit text, we need to be move the cumot to be executed. | command | Funclion | Horizontal. Moves | ia | he BackSpae moves the cursor one character to the left Ll =>, spacebar moves the cursor 4 character to the right } New line commands ° vet the cursor to the beqinin he | current line o4 q of $ moves the cursor one choracta t the i ind of the current line \Verkical Moves et km Moves cursor one line up ju Moves cursor one lire down | moves the cursor to the beginning of the previous lire ake Fimgtion Deletr the cwrent choaetr | A: Goin Commancls Two lines con be combine using jou commend. Compound con be used anywohere in the efor? es §: Sevolling Commands (1) Te Function F Sevalli up one line Scrolls down one line Serolls up a screen C12 linss? ctrltd © | Serolle down half aw screen Ga linus? ctrleb Stroll up whole screen Cas lines) Lebtef | Sonlt dopmohole screen (2a. lens? ~ 6: Undo Grmands Fetnation _— ju Undoes only the Cost edit SW. (Sever the contents of the buff, soilhout quiling vi iw filename jorites content of buffor:to, neo fi tle and continues 2 sones the contents of te bufhor and exits ng sou the content of the buffer and. exits 14 Exiks the WGL buffo, changed will not exit) 34! Breit the vi without vaving A -08 - 2020 ae ay oa | Basic nee Li who: displays all cuerrent tisere logged into the system - cake 6+cal to cleay of Fron t+ Uname ¥ehe 4-sily 3 lpr ineechy 4 who -y | 5+be 9: pleasud (3-seript Frcho-Hw 1-who:- i The who command cigplaye all were currently log qeol into the system Br:- gwho aptions:- ~wt-To know that he or she ie active (oly nol. This is known as idle dime: 85-870 % WhO - 2-Date:- ee Date command i uted to display the system date s Syntax t- date [option]....trormor] ca aby ae ; oe 44 Sdate “+ Today's date i + 4D. The lime is: 747” a: ty The ty command. basicalt prints the filename of the terminal connected to bow tad input 4:cet Terminal Getty) command * The set terminol commanel sets ob uncete selected termiror t/p /olp options sblhen the terminal is rot verponcling properly, the vet terminal command can be wed to reconfigure i, Syntax getty 5: be command “St turns UNIX into a calculator Syntax t- echo “izg tis" | be 6: Calencler (eal) command. +The calenden commord, cal, dit playe the calender for a specified month or for a year + SE is om example ‘i a command. that has no options bub wes arquemen + As general cformot % cal option [[manth]year] | Fman command The man command dicplays online doccumentation Ex: man cal 8: lpr command +The mort common print wdilily ts line printee Cpy B6-08- 2020 v je password Cpatcwd) : ae bicach, payed, is used to ede Your pascword Bape lo Clear Serecn Celean) TAY clea. command. cteaxt the sereen ancl puts the cunol at the top- + St & avatlable in qnort systems Syntace * Seleaxr Ir System Name Cuname) Bach onw sytem stores data, such as ts name about i itself. To see these data, we use the uname commend fe Syntax: uname | BEA, coi, aiiplay all the deta using the all option C-0) e Suname -a We can speafy only the name C-n) guname -n “Hl prints the kernel namec-s> guname -s * -x option: # prints he kernel teleate dote uname -r * Options can be combines, dor example, {g ditpla, the Operating biystem and ite release use sy J (ee ° ene. © 2 be re 6 lav echo echo command wt wed to display Une of ten /-et ring that | an pasied ar an arg wernent Secho “wWeleome fy UNE” 13: Script command +The script command con be usecl tf record an | interactive session ' *When you want to utart recording, key the command * Ts stop the ‘recording , key excel “Yu may have to we etrltd to E aft exil gs hc a * Directory Related Dtilitie, 1. pod ails 3-mkedir 4d 5-amdir tpwd, ~