Name:
Date:
To create a directory, use the mkdir command. To create a file, use the
editor pico.
For example, to create the file concat.c in
the directory strings (assuming that you have
already created the directory structure), type in
pico ~/csc8400/strings/concat.c
The contents of the file are not
important for this exercise, so simply type in any string you want (for
example, “This is the file concat.c”), then save it with Ctrl-O (see the menu at the bottom of the
editor window) and hit Enter, then Ctrl-X to exit. To make sure that the file
has been created, display the contents of the strings directory
ls
~/csc8400/strings/
You should see the name of the file listed.
To display the file contents, use
more
~/csc8400/strings/concat.c
Alternately, you may
use the more powerful editor emacs or any other editor you are familiar with.
1. Make
a copy of the entire file structure you created in step 1, so you can revert to
it in case you accidentally delete something:
cp
-r ~/csc8400 ~/csc8400copy
In the following
refer to the original copy your file structure (the one depicted above).
2. What
is the path to projects relative to your home
directory?
3.
What is the path to pointers relative
to your home directory?
4.
Make a copy of the pointers directory
under the projects directory.
5.
Make a copy of the overflow directory
under the csc8400 directory, then delete the original copy.
6.
Move the file tutorial.html
in the memory directory.
7.
Copy the file stack.c in your home
directory and rename it hello.c.
8.
Remove the strings directory
(and its contents).
9.
Rename blocks.txt
to blocks.mm