SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have started developing something like etc-update (from Gentoo) for Slackware. The purpose of the script is to look for ".new" configuration files and to find out whether they are identical with the old version or not.
If you are interested in contributing ideas, feel free to download the script from here. I'd appreciate your feedback and ideas.
You know that the Slackware packages only leave .new files when they are different from the originals? The install script deletes any .new files if they are identical to the file that is found already installed on the computer.
Originally posted by uselpa No, I did not know that. Does this include checks of file modes, gid, uid in addition to contents?
When I did the upgrade from 10.1 to 10.2, I sure found some identical files if I am not mistaken.
It checks md5sums. There is no way any identical files were left on your system. They must have been different. Even if only slightly.
Originally posted by uselpa The only reference I can find to md5 is in remarks.
That's because you're looking in the wrong spot. Look under /var/log/scripts and 'cat' the script of any package which installs files under /etc.
For example, this is an extract from the udev package script:
OLD="`dirname $NEW`/`basename $NEW .new`"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
# Otherwise, we leave the .new copy for the admin to consider...
Nobber, I don't know. What I know is that I don't trust md5. When I wrote a program to find duplicate files, I compared the files bytewise. All other programs I know of use hashed like md5 or sha1. In both, collisions exist.
Back to etc-update. As having completely identical files is obviously the exception, I added an 'act' mode. In act mode, you can compare and modify the config files. I guess it looks more like the Gentoo tool now.
Feedback is welcome. Have a look at the documentation for more explanation. And use with care.
Originally posted by Nobber
True, but the probability of a collision is vanishingly small. You're far more likely to be abducted by aliens on a wet Tuesday in May than to find an MD5 hash collision in your lifetime!
Here we go again.. why be less than certain if you can be 100% sure?
Getting back to the subject, I have released a new version that now uses vimdiff, i.e. vim, to visually manage the differences in the configuration files. I have also added a transcript of an interactive session to the doc and hence to the homepage.
I think that the script is now getting close to usable. I'll stop advertising it here, but I do appreciate all feedback, positive or negative, provided that "grep -i md5" and "grep -i alien" are empty.