1833207 Members
3017 Online
110051 Solutions
New Discussion

Comparing folder

 
Jason Tan
Advisor

Comparing folder

I have this scenerio, i got two directory, one is list_current and the other is list_restore. Both are identical with some same files and subdirectory. My question is, what combination of command best suite to do the following task.

search all files inside list_restore and list_current then compare both of them by SIZE and list out.
smtan
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Comparing folder

Hi:

Have a look at 'dircmp'. You can also use 'diff -r'. See the man pages for more information.

Regards!

...JRF...
Vincent Stedema
Esteemed Contributor

Re: Comparing folder

Hi,

You can use "cksum" to compare files on an individual basis.

Regards,

Vincent
Armin Feller
Honored Contributor

Re: Comparing folder

Hi,

use the dircmp(1) command.

For example,

# dircmp -d list_restore list_current

compares the two directories list_restore and list_current and produces a list of changes that would make the directories identical.

Regrads,
Armin