ICT211 Lab 4.docx - ICT211 Lab 4 JavaScript Basics Learning Objectives 1 Learn to use command tar to archive files and to extract files from archives 2

ICT211 Lab 4.docx - ICT211 Lab 4 JavaScript Basics Learning...

This preview shows page 1 - 4 out of 12 pages.

ICT211 Lab 4: JavaScript Basics Learning Objectives: 1. Learn to use command tar to archive files and to extract files from archives. 2. Learn to use command gzip and gunzip to compress and uncompress files. 3. Be able to use ps command to find out various information about processes. 4. Be able to find out the terminal names using tty command. 5. Be able to use kill command to terminate processes. 6. Understand how the client-side scripting and server-side scripting work and their differences. 7. Understand and be able to use the five primitive types and the associated operators Understand how the type of a variable is determined, and how JavaScript implicitly convert values from one type to the other and know how to explicit convert the value types. 8. Understand and be able to use standard string functions. 9. Understand and be able to use various control statements. 10.Understand and be able to debug JavaScript code in web browsers such as Firefox and IE. Required Reading: Sebesta: Chapter 4. LINUX: Rute User's Tutorial and Exposition (or just Rute for short): 4, 9 and 18.
Image of page 1
Required Software: Recent versions of the web browsers Chrome, Firefox and IE. An SSH client such as PuTTY. PuTTY is installed in the lab machine. External students can download the software from . WinSCP, which is available from the lab machines. External students can download it from Linux operating system Apache web server, available and running on ceto on TCP port 80. Note: Mac users can use the Terminal app (from Applications/Utilities) to do remote logins (command ssh) and file transfers (command sftp) instead of PuTTY and WinSCP. Instructions The following exercises are designed to get you familiar with Unix (Linux) systems. More information about these basic Unix commands is available from the relevant chapters in Rute. See the Required Readings. 1.Archive and Extract Files withtarWe often need to archive files and extract files from an archive. The Unix command for this task istar. The commandtarstands for Tape ARchive, since in the old days archives were stored on magnetic tapes. The command has numerous options. Check its manual page withman tar.One commonly used option is to create an archive file:tar -cvf your_tar_filename.tar directory_nameto create a tar fileyour_tar_filename.tarfrom files in the directorydirectory_name. For example the following command line (note that symbol "%" denote the shell prompt):% tar -cvf ~/lab03.tar ~/ICT211/lab03
Image of page 2
The above command would create tar file lab03.tar containing all files under directory ~/ICT211/lab03 . The tar file is stored under your home directory. Another commonly used option is to extract all files from tar file (often called tar ball): % mkdir tmp % cd tmp % tar -xvf ~/lab03.tar The first command creates a new directory tmp . The second command sets your current directory to tmp . The last command extracts all files from the tar ball inside directory tmp . Try the above examples. Try to create archives from other directories and extract the tar files (in a different directory).
Image of page 3
Image of page 4

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture