Help File System Watcher Kornshell

I want to make a script that monitors and compares my file sytem 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 waste 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

Frank

See Also
Programming Learning Session #1
Programming Learning Session #2

Have a Unix Problem
Do you have a UNIX Question?

Unix Books :-
UNIX Programming, Certification, System Administration, Performance Tuning Reference Books

Return to : - Unix System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.