Re: diff files matching a pattern
On Sun, Feb 24, 2008 at 2:21 PM, Kamaraju S Kusumanchi
<kamaraju@bluebottle.com> wrote:
> Let's say I have two directories dir1, dir2 each with 1000 files.
> Of these 1000 files in each directory, there are 50 files named file1.txt,
> file2.txt ... file50.txt. The rest of the files do not follow any pattern
> and are very large in size.
>
> Now is there any way to compare
>
> dir1/file1.txt and dir2/file1.txt
> dir1/file2.txt and dir2/file2.txt
> ....
> dir1/file50.txt and dir2/file50.txt
>
>
> Manually diffing the files 50 times is cumbersome. Something like
>
> diff dir1/file*.txt dir2/file*.txt
I think this should work:
$ diff --to-file=dir2 dir1/file*.txt
--
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh
http://mamarsh.blogspot.com
http://36pints.blogspot.com
Reply to: