Advertisement

09.06.2005 at 07:21AM PDT, ID: 21551994
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.2

Cron job to detect file changes

Asked by Brainstormer in Linux Programming

Tags: , , ,

I am looking for a bash script that runs as a daily cron job to do the following:

Test to see if a file was reduced by specific threshold, such as 10Kb and if so, send a list of those files to me via email.

Current situation:

Many DAT and BAKx files in a single folder. A utility checks the DAT files for needed modifications. If modifications are needed, it backups up the file to a BAKx file and modifies it. Sometimes the DAT file gets corrupt in the process, and the file size is shrunk considerably. The structure is as follows:

sample1.dat           1Kb  --- Modified 09-06-05
sample1.dat.bak1   22Kb --- Modified 09-04-05
sample1.dat.bak2   28Kb --- Modified 09-05-05
...
sample1.dat.bak5   24Kb --- Modified 08-30-05
sample1.dat.bak6   23Kb --- Modified 09-06-05

sample1.dat is the currently used file, but is corrupt (1Kb)
sample1.dat.bak6 is the most recent backup of this file as per this example based on the modified/created date, but it can be any of the BAK files

There are only 6 BAK files per DAT file.

I want to be able to detect if the DAT file changes considerably, either by keeping track of the previous size somehow and comparing it with the current or comparing it with the most recent BAKx file.

Note: the utility modifications are usually small 1-5Kb. When the file is corrupt, it shrinks to more than 5Kb, usually 10Kb or more.

Any ideas and scripts are welcome,Start Free Trial
[+][-]09.06.2005 at 07:42AM PDT, ID: 14829437

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.06.2005 at 08:27AM PDT, ID: 14829809

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2005 at 08:33AM PDT, ID: 14829857

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.13.2005 at 09:46AM PDT, ID: 14873455

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.20.2005 at 07:37AM PDT, ID: 14920557

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.25.2005 at 04:51AM PDT, ID: 14953699

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 01:40AM PDT, ID: 14957100

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 07:40AM PDT, ID: 14959052

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 08:16AM PDT, ID: 14959414

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Programming
Tags: bash, script, cron, file
Sign Up Now!
Solution Provided By: da99rmd
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.26.2005 at 08:46AM PDT, ID: 14959744

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 08:56AM PDT, ID: 14959871

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 09:08AM PDT, ID: 14959990

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 09:12AM PDT, ID: 14960024

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.26.2005 at 12:28PM PDT, ID: 14961779

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.27.2005 at 08:11AM PDT, ID: 14967296

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.27.2005 at 12:32PM PDT, ID: 14969826

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32