[Gllug] Diff only for file size

C. Cooke ccooke at gkhs.net
Tue Jul 29 23:33:51 UTC 2008


On Tue, Jul 29, 2008 at 09:39:56PM +0100, Garry Heaton wrote:
> Anyone know how to diff 2 directory trees but compare only file size rather 
> than a char-by-char comparison (v.slow) ?
> 

Given two directories, t1 and t2:

diff -u \
	<( cd t1; find . -printf "%p %s\n" ) \
	<( cd t2; find . -printf "%p %s\n" )

Will show you which files differ in size only. Grep for lines beginning
with '+' to show the files which have changed in the second directory.

-- 
Charles Cooke, Sysadmin 
Say it with flowers, send a triffid.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list