User Tools

Site Tools


os:lab02
Return to Home page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
os:lab02 [2019/08/10 21:55]
zioskenz
os:lab02 [2019/10/21 18:31] (current)
zioskenz [Exercise 02: Compilation and makefile]
Line 1: Line 1:
-aReturn ​to [[os:​|Operationg Systems home]]+Return ​to [[os:​|Operationg Systems home]]
 ---- ----
 ====== Operating Systems Course: Lab02 ====== ====== Operating Systems Course: Lab02 ======
Line 11: Line 11:
 Compile the program with ''​gcc''​ and verify its operation comparing the results with the shell command ''​ls -R''​ Compile the program with ''​gcc''​ and verify its operation comparing the results with the shell command ''​ls -R''​
  
-**Suggestions:​**+**Suggestions:​**\\
   * Write a recursive procedure that generalizes the non-recursive display of a directory analyzed in the class lesson   * Write a recursive procedure that generalizes the non-recursive display of a directory analyzed in the class lesson
   * Pay attention to the managing of the paths of the directories/​files   * Pay attention to the managing of the paths of the directories/​files
Line 27: Line 27:
   * Edit the previous Makefile using variables to specify the compiler, the compilation options, and the file name.   * Edit the previous Makefile using variables to specify the compiler, the compilation options, and the file name.
  
 +Take as reference the example analyzed in classroom: [[https://​www.skenz.it/​listing/​os/​u03-Linux-environment/​u03s02e/​01-compiler/​Makefile4|Makefile4]]
 +==== Exercise 03: Recursive copy of a directory ====
 +Write a program in C language able to:
 +  * receive on the command line two paths (absolute or relative)
 +  * copy //​recursively//​ the content of the directory identified by the first path in an identical directory with root the second path.
  
-==== Esercizio 03: Copia ricorsiva di un direttorio ==== +**Suggestions:​**
-Si scriva un programma in linguaggio C in grado di: +
-  ​ricevere sulla riga di comando due path (assoluti o relativi) +
-  ​copiare ​*ricorsivamenteil contenuto del direttorio individuato dal primo path in un direttorio identico con radice uguale al secondo path. +
- +
-Suggerimenti:​+
  
-Si modifichi la procedura ricorsiva di visita di un albero di direttori creata all'​esercizio numero 1Durante la visita del direttorio sorgente creare una copia identica di ciascuna ​"​entry"​ +Modify the recursive visit procedure of a directory tree created in Exercise 01During the visit of the source directory, create an identical copy of each "​entry"​ 
-  * ri-creandone i direttori ​(mediante ​system call mkdir) ​nel direttorio destinazione +  * re-creating the directories ​(using the system call ''​mkdir''​in the destination directory 
-  * ri-copiando i file (mediante ​system call open, read, write close)+  * re-copying the files (using system call ''​open''​''​read''​''​write''​ and ''​close''​).
-Come in precedenza si presti attenzione alla gestione dei path (relativi o assoluti) all'​interno del direttorio sorgente e del direttorio destinazione.+

If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/os/lab02?rev=1565466929&do=diff
/web/htdocs/www.skenz.it/home/data/attic/os/lab02.1565466929.txt.gz · Last modified: 2019/08/10 21:55 by zioskenz

Privacy Policy