Newcomer

Kevin Kofler kevin.kofler at chello.at
Sun Oct 23 02:22:15 CEST 2011


Nicolas Viéville wrote:
> Thanks for your review and the tip. If I understand correctly the diff
> command would be "diff -u old new" or you need some more switches in
> general to the diff command (for example: diff -Naur)?
 
diff -u is sufficient to diff 2 individual files.

The other letters in the often used -Naur are:
* -r = recursive, should always be used when diffing directories (i.e. use 
diff -ur as a minimum in that case).
* -N = includes files which are only in either of the 2 directories, 
treating them as added or removed. Needed if you added or removed any files, 
but unwanted if one directory has object files, executables or some other 
generated files and the other does not.
* -a = includes all files, even if diff thinks they're binary. Usually a bad 
idea (especially if there are object/executable files or other such 
generated binaries in your directories), but sometimes diff might think a 
file is binary when it isn't really (e.g. because it's an FSF text file with 
"form feed" characters in them (I haven't seen anybody else use form feeds 
for years, but the FSF still uses them for some reason)).

        Kevin Kofler



More information about the rpmfusion-developers mailing list