If you have a system available with the root password do the following:
dump
, rdump
, or tar
).
du
command
to find a subdirectory with less than 1 Mbyte of data.
tar
to create a file that contains all of the files in
your <
1Mbyte area. The command should look something like
this:
This will create acd /var/tmp/ tar -cvf your-user-name.tar ~/
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.
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 compress command. Compress the files using thels -l
compress
command:
Compare the size ofcompress your-user-name.tar
andyour-user-name.tar
Write this on your final printout. Write down the compression percentage.your-user-nametar.Z
.
uncompress your-user-name.tar.Z
gzip
and gunzip
commands. Skip this section if you must.
Re-compress the files using the gnu gzip
command:
Compare the size ofgzip your-user-name.tar
andyour-user-name.tar
Write the result of your comparison on your final output.your-user-name.tar.gz
Kermit
or ftp
.
There are PC systems in the computer lab (in room BUS R6E)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.
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.cd mkdir backup-dir cd backup-dir tar -xvzf /var/tmp/your-user-name.tar.gz
tar
defaults to a tape drive.
This should include yourcd ls -lR
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
.
Append this file to your printout.find /usr/bin -user root -perm -4000 -print
Make sure that the to-dir is not in the from-dir. You may want to remove both from-dir and to-dir.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 - )
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.
and the results of the file compression.your-name TABER CSC137 Lab 4.19: System Administration