Clone repository

Before you continue, you must clone the module-4 repository.

Use the git command

From the terminal, navigate to a directory where you want the cloned directory to be created and execute the following command.

$ git clone

Now you should see something similar to this in the terminal.

$ git clone
Cloning into 'module-4'...
remote: Counting objects: 23, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 23 (delta 1), reused 23 (delta 1), pack-reused 0
Unpacking objects: 100% (23/23), done.

Use the tree command

To get an overview of the cloned repository, use the tree command.

$> tree module-4

Now you should see a tree view of all files and directories in the module-4 directory.

├── all
├── examples
│   ├── Makefile
│   ├── bin
│   ├── obj
│   └── src
│       ├── balance.c
│       ├── callbacks.c
│       ├── hello_pthreads.c
│       ├── pthreads_and_fork.c
│       ├── pthreads_create_exit_null_join.c
│       └── pthreads_unsynchronized_concurrency.c
└── mandatory
    ├── Makefile
    ├── bin
    ├── obj
    └── src
        ├── bounded_buffer.c
        ├── mutex.c
        ├── rendezvous.c
        ├── timing.c
        └── timing.h
8 directories, 14 files

The all utility

The all utility can be used to run a shell command in all subdirectories, i.e., run a command in both the examples directory and mandatory directory. In the terminal, navigate to the module-4 directory. Now you can use the all utility together with make to compile all programs.

$ ./all make

The all utility can also be used to delete all objects files and executables.

$ ./all make clean