4.16 System Administration |
The term "system administration" covers a lot of areas. If you are a good Unix systems administrator, you have many different tasks to deal with and you have the root password. On gort, students don't know the root password, so what can be done is limited. (At least they aren't suppose to know the root password!)
If you have a system available with the root password do the following:
dump
, rdump
, or tar
).
If you are using gort for the system administration lab I would like
you to produce a single annotated printout. So as you go through the
following
steps save your output into a file that you can edit later. One way of
doing this is script
command. It will produce a file called
typescript.
du
command
to find a subdirectory with less than 1 Mbyte of data.
Use tar
to create a file that contains all of the files in
your <
1Mbyte area. The command should look something like
this:
cd /var/tmp/ tar -cvf your-user-name.tar ~/
This will create a tar
file in /var/tmp/ with your
user-name as the file name. tar
will try to tar
its own output
if given the chance.
ls -l
to find out the size of the archive file prior to
the compression. Write down the size of the file; it will be deleted
by the gzip
command. Compress the files using the gzip
gzip your-user-name.tar
Compare the size of
your-user-name.tar
and
your-user-name.tar.gz
Write the result of your comparison on your final output.
scp
.
There are PC systems in the Academic Computing Center, Santa Catalina building, room C202
that can be used to do this, or you can do it
over the Internet.
Make sure that the file is transferred as a binary file.
backup-dir
").
Uncompress your file into this area, then expand the tar
file to restore your files.
The first cd
will take you back to your home directory.
cd mkdir backup-dir cd backup-dir tar -xvzf /var/tmp/your-user-name.tar.gz
The -x option is for "eXtract".
The -v option is for verbose. It will list the file names.
The -z option will decompress the tar file on the fly.
The -f option is for a following file name.
tar
defaults to a tape drive.
cd ls -lR
This should include your backup-dir
and the original subdirectory.
Remember to print all of your results together as a single printout
for this lab.
df
command to look at the file systems on gort.
Save a copy of the results.
mount
command to look at the file systems mounted on
the system. Append this to your output.
finger
, ps -ae
, and ps -al
to see
what else is on the system.
ps
is a process status program.
It shows what you and other people have running.
Append the results of these commands to the file from the previous step.
top
command.
This shows the top processes on the system.
End the command with a q
.
find /usr/bin -user root -perm -4000 -print
Append this file to your printout.
cd mkdir from-dir mkdir to-dir cd from-dir ** Put some files in the from-dir directory ** tar -cf - . | ( cd to-dir; tar xvf - )
Make sure that the to-dir is not in the from-dir.
You may want to remove both from-dir and to-dir.dmesg
command to see the
"power-up" messages for the system.
Include this information in your "turn-in" file.
rm -r backup-dir
to remove all
of the files and the new backup-dir
sub-directory. Keep your
floppy as long as you want it.
Also delete /var/tmp/your-user-name.
Turn in the printout and mark it with:
your-name TABER CIS137 Lab 4.16: System Administration
and the results of the file compression.
Instructor: Louis Taber, louis.taber.at.pima at gmail dot com (520) 206-6850
My web site in Cleveland, OH
The Pima Community College web site
4.16 System Administration |