HW3
COP-3402
Table of Contents
In this exercise, you will restructure one file tree into another, using any of the unix utilities shown in class (cp, mv, mkdir, rmdir, touch, ls). Submit the exact sequence of bash commands used. Remember to use tab-completion to make using the command-line easier.
Directions
ssh into eustis:
ssh NID@eustis.eecs.ucf.edu
Download the file tree for the exercise:
wget -O ~/hw3.tar 'https://www.cs.ucf.edu/~gazzillo/teaching/cop3402fall24/files/hw3.tar'
Untar the file tree:
tar -C ~/ -xvf ~/hw3.tar
Enter the file tree:
cd ~/hw3
The file tree should look like the following when typing
tree ~/hw3
. ├── drivers ├── fs │ └── ext2 │ └── acl.c ├── hid │ ├── bpf │ │ └── Makefile │ ├── i2c-hid │ │ └── Makefile │ └── usbhid │ └── Makefile ├── Makefile └── net └── ethernet
Now find a sequence of commands that restructures the tree into the following one:
. ├── drivers │ ├── hid │ │ ├── bpf │ │ │ └── Makefile │ │ ├── i2c-hid │ │ │ └── Makefile │ │ └── usbhid │ │ └── Makefile │ └── Makefile ├── fs │ └── ext4 │ └── acl.c ├── Makefile ├── net └── sound
- Submit the sequence of bash commands as your homework.
Important notes
- There are many ways (sequences of commands) to solve the problem.
- The entries (children) in a directory are unordered. For instance, if
fs/
is before or afterdrivers/
that is okay. The file system guarantees tree structure, i.e., parent-child relationships, but not ordering of entries in a directory. If you need to start over, go back home, move your prior hw3 version away, and unpack the example again:
cd ~ rm -r ~/hw3 tar -C ~/ -xvf ~/hw3.tar cd ~/hw3
You only need these commands to perform the changes
Command Description touch create file rm ReMove mv MoVe cp CoPy mkdir MaKe DIRectory rmdir ReMove (an empty) DIRectory