[SOLVED] difference in files in two directories ignoring date/time (and subdirectories)
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
The utility diff does it as a matter of course. It is so simple that there will not be any guides, tutorials, or howtos to find on the net.
Code:
diff ./A/ ./B/
That will show you which files are only present in one directory or the other as well as files of the same name which different in content between the two directories. See "man diff"
The utility diff does it as a matter of course. It is so simple that there will not be any guides, tutorials, or howtos to find on the net.
Code:
diff ./A/ ./B/
That will show you which files are only present in one directory or the other as well as files of the same name which different in content between the two directories. See "man diff"
Thanks, you are a star. 'man diff' is very sparse on Centos 7, , does say 'compare files line by line' which I guess describes it but a little clarification in man page may be good. Where should I suggest this?
Thanks, you are a star. 'man diff' is very sparse on Centos 7, , does say 'compare files line by line' which I guess describes it but a little clarification in man page may be good. Where should I suggest this?
It's there near the end, but definitely not clear or terribly obvious:
Quote:
FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'. ...
Solving it would not be hard, technically. I'd get the source RPM and add the line(s) you need to the manual page and then make a diff of the changes, and attach the diff to the bug report you submit to the CentOS Bug Tracker. They can then kick it upstream.
Sorry to be negative about info pages, but I gave up wasting time on them years ago. Nearly all of them are just placeholders and then those very few that aren't placeholders are split up into many uselessly small pages strung together with an exceedingly poor navigation system. If info pages were plain HTML 2.0 and navigable in any text-based browser, I'd be all over them, but as it stands, I don't see a future for info pages. As far as I can tell they exist only to drag down the quality and quantity of GNU/Linux documentation and make FreeBSD look good by comparison.
However, either way, it is something to bring up with the diff maintainers for CentOS in this context.
Sorry to be negative about info pages, but I gave up wasting time on them years ago. Nearly all of them are just placeholders and then those very few that aren't placeholders are split up into many uselessly small pages strung together with an exceedingly poor navigation system. If info pages were plain HTML 2.0 and navigable in any text-based browser, I'd be all over them, but as it stands, I don't see a future for info pages. As far as I can tell they exist only to drag down the quality and quantity of GNU/Linux documentation and make FreeBSD look good by comparison.
However, either way, it is something to bring up with the diff maintainers for CentOS in this context.
I don't disagree at all. I just wanted to note that in this case, the explanation of how diff works with directories was much clearer there that in the man page.
That it did what it does with directories was new information to me, for which I thank you. Very cool!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.