Final Exam review exercises#

1. Static and shared libraries. Header files.#

  • Install package libgpg-error-dev on your desktop.

  • What are the file names that contain static libraries, dynamic libraries, and header files in the package?

  • Specify the commands you used to find the file names.


2. Static and shared libraries#

  • Install package libgsl-dev on your desktop.

  • What are the file names that contain static and dynamic libraries in the package?

3. Compilation and Makefiles#

Find three examples of source code for matrices with Gnu Scientific Libraries (GSL) at the link below: https://www.gnu.org/software/gsl/doc/html/vectors.html#example-programs-for-matrices

Store them in three files:

  • matrix_alloc.c

  • matrix_file.c

  • matrix_view.c

A) Compile each of the files: matrix_alloc.c, matrix_file.c, matrix_view.c , and run the executables.
B) Develop a Makefile with the targets to compile each of the files.
C) Install make and run it for the targets.




4. Python scripting#

Start jupyter notebook in directory Python.

The tasks below, should be completed within jupyter notebook:

A) Create nested directory tree DIR1/DIR2/DIR3

B) Write words ‘task1’, ‘task2’, ‘task3’, and ‘task4’, each in new line, into file output.txt in directory DIR1/DIR2/DIR3


5. Python scripting#

A) Write a python script to find all files with extension .script in directory /usr.
B) Modify the script to provide the searchable filename as an argument. Run the scipt to find files with extensions .script, then .conf


6. Task scheduling#

  • A) Schedule the script in 5A to run once on July 9 at 11 pm.

  • B) Schedule the script in 5A to run every Wednesday at 10:15 AM.