I want to make a script that monitors and compares my filesytem with
a tar archive which holds all the files on my system.
What's the best way to start with this?
Depends on which event should be monitored.
You could monitor the deletion of a file/directory and/or the creation
of a new file/directory ?
and/or file manipulation.
The best way would not start with an Tar file.
because it wast a lot space and other ressources for a simple list
generation.
But if you have good reasone to use a tar file you could start by sample
script below:
This script shows you deletet files and directorys.
for file in `tar -tf comp.tar`
do
if [ ! -f $file -a ! -d $file ]
then
echo "$file missing"
fi
done
Quick Links:
Do you have
a UNIX Question?
Unix Home: Unix System Administration
Hints and Tips