I have a directory which is /home/mark/files/ , inside this particular I have a bunch of filles (see examples below)
TST_SHU_00014460_20090302.txt
TST_SHU_00016047_20090302.txt
TST_SHU_00007838_20090303.txt
TST_SHU_00056485_20090303.txt
TST_SHU_00014460_20090303.txt
TST_SHU_00014176_20090303.txt
And I also have another directory which is /home/dest/ which has the following dirs
00014460
00016047
00056485
As you can see, the directories matches a part of the files, inside each one of these directories i have subdirectories and anywhere inside these dirs the same files as in the first dir is copied there
I would like to have a shell script that would get the latest 10 file names created on the first dir (/home/mark/files/) and find them on the second dir /home/dest/ and when a file on the first directory has 0 bytes but on the second directory has data send me an e-mail and viscebersa when a file on the second directory has 0 bytes but the files on the first directory has data send me an email.
Thanks