DOS/Windows equivalents to Unix commands
August 6, 2004 1:10 AM   Subscribe

Question re: DOS/Windows equivalents to Unix commands (more inside).

I have two large (up to thousands of files) folders which I need to do a comparison on to see the differences.

For example, in Unix, this could be done by running a find . -print and piping to diff. But what's the best way of doing this on Windows-based systems?

Thanks,
posted by plep to Computers & Internet (10 answers total)
 
Cygwin!

As far as I know, there's no DOS equivelant to diff.
posted by cheaily at 1:18 AM on August 6, 2004


If you don't feel like installing Cygwin or Services for UNIX, grab UnixUtils, which are Win32 ports of some common utilities, including the ones you seek.
posted by j.edwards at 1:49 AM on August 6, 2004


There are several Windows implementations of diff, eg windiff.

Textpad (the text editor) also offers this functionality.

Cygwin is a good long term solution if you want to keep your traditions from the old country but windiff'll get you over the hump.
posted by i_am_joe's_spleen at 1:51 AM on August 6, 2004


IIRC, DOS has FC to compare files.
posted by reynaert at 1:55 AM on August 6, 2004


Or MinGW if you don't wanna do all-out CygWin.
posted by RavinDave at 2:02 AM on August 6, 2004


On a sidenote: You are aware of the -r option for diff I hope? (compare directories recursively).

Generally, the nicest way to run diff is diff -urN.
posted by fvw at 5:21 AM on August 6, 2004


reynaert is correct. fc is what you want


>fc /?
Compares two files or sets of files and displays the differences between
them


FC [/A] [/C] [/L] [/LBn] [/N] [/T] [/U] [/W] [/nnnn] [drive1:][path1]filename1
[drive2:][path2]filename2
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2

/A Displays only first and last lines for each set of differences.
/B Performs a binary comparison.
/C Disregards the case of letters.
/L Compares files as ASCII text.
/LBn Sets the maximum consecutive mismatches to the specified number of
lines.
/N Displays the line numbers on an ASCII comparison.
/T Does not expand tabs to spaces.
/U Compare files as UNICODE text files.
/W Compresses white space (tabs and spaces) for comparison.
/nnnn Specifies the number of consecutive lines that must match after a
mismatch.
posted by escher at 9:36 AM on August 6, 2004


Even if you don't use it for this give Textpad a test drive. Best windows text editor hands down.
posted by Mitheral at 10:48 AM on August 6, 2004


Response by poster: Thanks for the pointers, all. I'll try them out last week. Sorry for the late reply.

(I tried playing with FC but it didn't really do what we needed in this case; but thanks anyway :) ).
posted by plep at 12:31 AM on August 7, 2004


Response by poster: Last = next, d'oh.
posted by plep at 12:31 AM on August 7, 2004


« Older Div div the div div?   |   Preventing Colon Cancer Newer »
This thread is closed to new comments.