LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   compare two folders (https://www.linuxquestions.org/questions/linux-newbie-8/compare-two-folders-349777/)

bluenectar 08-03-2005 10:27 PM

compare two folders
 
Hi,
what is the command for comparing two folders, if there were two folders that might be contain same files so I want to know what file is not the same. Maybe the purpose just like diff command.
Thanks in advance,

:newbie:

xowl 08-03-2005 11:10 PM

Try Kompare

bluenectar 08-03-2005 11:17 PM

Hi,
unfortunately there is no command named kompare in RedHat or maybe I missed something ?
thanks in advance,

volvogga 08-03-2005 11:50 PM

Your question sounds like something that I used to use an NDOS command for in DOS. I'm surprised not to find anything like what your question is looking for in the BASH command list.

Just to clarify, are you looking for something to tell you if all the files of two directories are binary-ily (not sure what the word would be) the same, or if the directories contain the same files?

bluenectar 08-03-2005 11:55 PM

Hi,
I'm looking for something that could tell me what files (not in binary) are not the same between two directories ?
thanks

volvogga 08-04-2005 12:22 AM

Maybe this is a bit overkill for what you are looking for, but I saw it suggested in a similar thread. Look at Midnight Commander.

http://www.ibiblio.org/mc/

Never used it myself, but may be worth a try.

bluenectar 08-04-2005 12:59 AM

thanks volvogga

xowl 08-04-2005 09:08 AM

go to
kde.org
and download
kdesdk###.rpm
then
rpm -i ThePackage.rpm

and finally
kompare

enemorales 08-04-2005 11:13 AM

From diff's manual:

Code:

NAME
      diff - find differences between two files

SYNOPSIS
      diff [options] from-file to-file

DESCRIPTION
      In  the simplest case, diff compares the contents of the two files from-file and
      to-file.  A file name of - stands for text read from the standard input.  As  a
      special case, diff - - compares a copy of standard input to itself.

      If  from-file is a directory and to-file is not, diff compares the file in from-
      file whose file name is that of to-file, and vice versa.  The non-directory file
      must not be -.

      If both from-file and to-file are directories, diff compares corresponding files
      in both directories, in alphabetical order; this  comparison  is  not  recursive
      unless  the  -r  or --recursive option is given.  diff never compares the actual
      contents of a directory as if it were a file.  The file that is fully  specified
      may  not be standard input, because standard input is nameless and the notion of
      ‘‘file with the same name’’ does not apply.

Is that what you want?

bluenectar 08-04-2005 09:32 PM

Hi,
@enemorales : so the 'diff' command can be used for comparing directories too ?
I'll try this ASAP and post the result

@xowl : btw thanks xowl I'll try your suggestion too, I'll report it soon to share with you

regards,

bluenectar 08-04-2005 11:23 PM

@enemorales : I've tried the diff command and it worked well thanks anyway friend !

@xowl : I'll try it on my computer at home since my admin wasn't allowed me todo that on server


All times are GMT -5. The time now is 08:38 PM.