- First make sure that your code is sitting in its own subdirectory, e.g.,
in my case, my code is in my
.../asg01
directory:
[andrewd@pupil] ~/teaching/dpa401/src/examples/asg01 > ls
Makefile asg01.h dops* templated/
asg01.cpp dopdf* non-templated/ yarra.cpp
[andrewd@pupil] ~/teaching/dpa401/src/examples/asg01 >
- Do a
make clean
to clean up all the *.o
and
executable files (to reduce space):
[andrewd@pupil] ~/teaching/dpa401/src/examples/asg01 > make clean
rm -f asg01.o core yarra.o yarra
rm -f *.ps *.pdf
- Change directories to one above the current project directory, e.g.:
[andrewd@pupil] ~/teaching/dpa401/src/examples/asg01 > cd ..
[andrewd@pupil] ~/teaching/dpa401/src/examples >
- Create the tar file. The command syntax is:
tar cvf <file.tar> <directory>
where <file.tar>
is the tar file being
created, and <directory>
is the directory
which will get archived (stuffed) into the single tar file. You'll
see a list of a <directory/file>
additions being assembled into the tar file. You will then
have the file <file.tar>
.
[andrewd@pupil] ~/teaching/dpa401/src/examples > tar cvf asg01.tar asg01/
asg01/asg01.cpp
asg01/asg01.h
asg01/Makefile
asg01/yarra.cpp
...
- Compress the tar file using
gzip
:
[andrewd@pupil] ~/teaching/dpa401/src/examples > gzip asg01.tar
You'll now see the file <file.tar.gz>
.
This is the file you want to submit electronically.