I need to compare shadow file sizes with their real file counterparts. If the shadow file size differs form the realfile size then it must send a mail. My problem is that our system has over 1600 shadowfiles in different directories, with different names. the only consistancy is the .sh file ext for shadowfiles.
Any easy way of doing this ?
Are you sure the .sh files you found are not called .sh because they are shell scripts?
UNIX does not associate what a file is by the file extension like windows does.
You can get the "flavor" of a file with the file command
file myscript.sh
will return something like "Bourne Shell script" if it is a Bourne shell script, for example.