About this list Date view Thread view Subject view Author view Attachment view

From: klavs klavsen (kl_at_vsen.dk)
Date: Sat 09 Mar 2002 - 10:15:24 GMT


On Fri, 2002-03-08 at 13:01, Sam Vilain wrote:
> I also have a Perl solution.
>
> My script[1] is not tied to a distribution at all; it merely scans X
> (where X >= 2) directory structures, and where files are identical in the
> two structures, it hard links them (and optionally sets immutable and
> immutable linkage invert inode attributes, btw thanks for the chattr()
> routine).
Watch out for the comparison. A file can look exactly alike, according
to ls -l, and still not be the same. I would definetely do a sha1 or
md5sum check to ensure that they are truely identical.

>
> For this script to work, you'll need to install Pod::Constants and
> ReadDir, from my modules collection (http://sam.vilain.net/pm/).
>
> The script is at http://sam.vilain.net/vserver/unify-dirs
>
> You could use it like this:
>
> unify-dirs -vil /vservers/*/usr
> unify-dirs -vil /vservers/*/lib
> unify-dirs -vil /vservers/*/sbin
> unify-dirs -vil /vservers/*/bin
sounds very cool.. perhaps i'll have a look at making it log, which
files it vunified - and then the next day, you could run it against the
log, and it would tell you if anything changed - a very simple but
effective IDS.

:-)

-- 
Regards,
Klavs Klavsen

-------------| This mail has been sent to you by: |------------ Klavs Klavsen - Open Source Consultant kl_at_vsen.dk - http://www.vsen.dk

Get PGP key from www.keyserver.net - Key ID: 0x586D5BCA Fingerprint = A95E B57B 3CE0 9131 9D15 94DA E1CD 641E 586D 5BCA --------------------[ I believe that... ]----------------------- It is a myth that people resist change. People resist what other people make them do, not what they themselves choose to do... That's why companies that innovate successfully year after year seek their peopl's ideas, let them initiate new projects and encourage more experiments. -- Rosabeth Moss Kanter



About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 06 Nov 2002 - 07:03:39 GMT by hypermail 2.1.3