Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
You'd get more/better responses if you put this question in its own thread, since it has absolutely nothing to do with the original question.
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.
We'll be glad to help...so post what you've written/tried so far, and tell us where you're stuck. But you don't provide any real details here, such as what you're trying to compare (quantity, location, etc.), how you want to perform the check, etc.
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.
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.
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.
All I have to say is "Wow! You don't listen."
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.
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.
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.
Yes, we know this. Asking the EXACT SAME QUESTION a second time doesn't get you answers faster (or at all). Did you not read/understand what was told to you???
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.