A Moving Experience
Here is a small task
to practice moving files around. This is an exercise; not
a particularly useful task, though it should help practice some
- Copy the source code for the pure ftpd server. (This is just a quick
way to get a bunch of files; we're not going to build the software.)
the code from the distribution site.
You can download through your browser in the usual way, or from the Unix
shell with the command
- Store the file pure-ftpd-1.0.47.tar.gz in your home
directory. This is a gzipped tar file, analogous to a zip file,
but with some rather important internal differences.
- Go to your home directory and unpack
the distribution with this command:
tar zfx pure-ftpd-1.0.47.tar.gz
should now have a directory pure-ftpd-1.0.47 inside your
- Delete (remove) all the files named Makefile or with names
starting with Makefile. There are several (lots of
Makefile.am and Makefile.in) at different levels.
- Create another directory in your home area. You may call it
anything you like, but I'll call it collect rather than having
to be vague for the rest of the instructions.
- Inside collect, create a directory READMEs. From the
pure ftp source directory, move all files
whose names begin with README
into collect/READMEs. Most are in the top level of the tree.
A few are one directory level down. For those, move them and rename
them with the their directory name as a prefix. For instance,
foo/README.wombats would be become foo_README.wombats
inside the collect/READMEs directory.
- For every other file anywhere in the pure ftpd directory which has
an extension (which contains a dot, like dynamic.c, but not
FAQ), create a directory under pure named after the extension,
and move the file into it. That is, for dynamic.c, create a
directory collect/c if it does not already exist, and move
the file dynamic.c into it. So under collect, you
should have directories names c, h, in, conf,
and several others.
- Create one more directory under collect called misc and
move any remaining files there. Leave all directories in place.
(If you accidently move a directory, you can always just move it back.
I'll never know.)
should be left with a tree of directories, all empty except for
- Go to your home directory (where pureftp and collect reside)
and execute this command:
ls -lR pure-ftpd-1.0.47 collect > listing.txt
This will create a file called listing.txt. Send it to me
(If you used a name other than collect for you new directory,
use that name in the command instead.)
Don't forget that you can do things like ls */*.c to list
all the .c files one level down.
Also useful for mv and such.
One hint: When moving files around, you
you might find it useful to open two shell windows,
one in the pureftp directory, and one in collect. If you're
using an installation with a GUI, just open the two windows. If
you're comming from Windows, run two putty windows and connect
twice. Likewise, coming from a Mac, run two command shell windows
and connect each one.