Shell Scripting Issues
I have three production servers, like A, B and C where A is the home directory, i need a script to compare the contents of A to B and C and subsequently email the difference. I will appreciate any help i can get on this.
|
Quote:
|
Quote:
If all you're looking to do is compare file names and spot differences, then just do a "find /some/path -type f > filename", then you can grab that file with rsync, scp, etc., and just run a diff on them. |
Need some help on this one
I have three production servers, like A, B and C where A is the home directory, i need a script to compare the contents (list of file names and location)of A to B and C and subsequently email the difference. I will appreciate any help i can get on this.
|
Quote:
1.) Give it an attempt and post your attempt. Look towards info on how to ask a question and recommendations for what to do when including code in your posts. Copied from TBone's signature: https://www.linuxquestions.org/linux...Ask_a_Question 2.) When creating your attempt. "Think" about how you'd do that normally. I.e. you'd get the directory listing of all, and then difference them. Well ... script that using the most basic commands and then add features as you need them, or if you discover problems, post your attempt, and present your problem(s) clearly so that people can help you, and will be willing to help you. 3.) Remember that this is a forum of volunteers. No one is required to answer questions, but they do so to help you learn. |
Quote:
|
So, I didn't even get to the bottom of the post and I'm already annoyed. You you really should try advice given if you are going to continue to ask for it.
However, If you need a solution spelled out for you, a quick google search found someone with the same problem, who seems to have found a solution. http://nixcraft.com/showthread.php/1...e-it-exceed-75 |
If you're trying to monitor systems, why reinvent the wheel? Look into the multitude of free/opensource monitoring tools that are available. Personally, I like Xymon (used to be called Hobbit). But there are a ton of others.
But, if instead you are doing a homework assignment here, many folks will be more willing to help you if you try it yourself and then ask questions regarding the areas where you have stumbled. A blatant request to "do my homework for me" doesn't often get many responses. This has "homework assignment" written all over it as I see things, and I think others probably do as well, and that may be the reason why you haven't seen the solution (which is very simple) laid out for you ready-to-turn-in-for-class. Give it a shot yourself. Post what you've done. Point out where you're having problems and some specific questions you have, and I'll bet the help from the LQ.org community starts rolling in. |
All times are GMT -5. The time now is 06:16 AM. |