You can add %TY-%Tm-%Td %TH:%TM to the find command if you want to compare date/time to the minute. This means it won't show empty folders that only appear on one folder but not the other, but it will show all files that differ in size or name. zip mounted on gvfs will show size 0 folders). It only examines files, not folders because find foldername -printf '%s\n' will produce inconsistent sizes on different filesystems (like a. I'm using process substitution with a repeated find command to list the files and their sizes recursively, then comm -3 to only show files in one dir or the other. Then run it easily with: quickdiff dir1 dir2 Doesn't have to slowly examine file contentsĬopy paste this function into the terminal: quickdiff().if we don't do this all the lines will be considered as differences.įinally diff 1.txt 2.txt will show us the differences between the two directories. We need to do this because we use diff to find the differences between the two text files. This command basically replaces all the D1 with D2 in 1.txt. Here is what I used to find the differences between the two under 5 minutes: du /D1/ | sort > 1.txt
0 Comments
Leave a Reply. |