LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2005, 11:27 PM   #1
bluenectar
LQ Newbie
 
Registered: Jul 2005
Distribution: CentOS 5.0
Posts: 18

Rep: Reputation: 0
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,

 
Old 08-04-2005, 12:10 AM   #2
xowl
Member
 
Registered: Jan 2005
Distribution: Slackware current (and others)
Posts: 188

Rep: Reputation: 30
Try Kompare
 
Old 08-04-2005, 12:17 AM   #3
bluenectar
LQ Newbie
 
Registered: Jul 2005
Distribution: CentOS 5.0
Posts: 18

Original Poster
Rep: Reputation: 0
Hi,
unfortunately there is no command named kompare in RedHat or maybe I missed something ?
thanks in advance,
 
Old 08-04-2005, 12:50 AM   #4
volvogga
Member
 
Registered: Aug 2004
Location: MI, USA
Distribution: Fedora Core 3
Posts: 137

Rep: Reputation: 15
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?
 
Old 08-04-2005, 12:55 AM   #5
bluenectar
LQ Newbie
 
Registered: Jul 2005
Distribution: CentOS 5.0
Posts: 18

Original Poster
Rep: Reputation: 0
Hi,
I'm looking for something that could tell me what files (not in binary) are not the same between two directories ?
thanks
 
Old 08-04-2005, 01:22 AM   #6
volvogga
Member
 
Registered: Aug 2004
Location: MI, USA
Distribution: Fedora Core 3
Posts: 137

Rep: Reputation: 15
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.
 
Old 08-04-2005, 01:59 AM   #7
bluenectar
LQ Newbie
 
Registered: Jul 2005
Distribution: CentOS 5.0
Posts: 18

Original Poster
Rep: Reputation: 0
thanks volvogga
 
Old 08-04-2005, 10:08 AM   #8
xowl
Member
 
Registered: Jan 2005
Distribution: Slackware current (and others)
Posts: 188

Rep: Reputation: 30
go to
kde.org
and download
kdesdk###.rpm
then
rpm -i ThePackage.rpm

and finally
kompare
 
Old 08-04-2005, 12:13 PM   #9
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 31
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?
 
Old 08-04-2005, 10:32 PM   #10
bluenectar
LQ Newbie
 
Registered: Jul 2005
Distribution: CentOS 5.0
Posts: 18

Original Poster
Rep: Reputation: 0
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,
 
Old 08-05-2005, 12:23 AM   #11
bluenectar
LQ Newbie
 
Registered: Jul 2005
Distribution: CentOS 5.0
Posts: 18

Original Poster
Rep: Reputation: 0
@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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compare folders GUI linmix Linux - Newbie 4 09-12-2011 06:21 PM
How do I compare 2 files? linuxhippy Slackware 6 03-26-2005 02:54 AM
How to compare two folders contents? rvoigt Linux - Newbie 6 01-07-2005 01:35 AM
directory compare tmoorman Linux - Newbie 2 09-26-2003 02:45 PM
hosts.compare? WeNdeL Linux - Newbie 0 01-17-2003 01:00 PM


All times are GMT -5. The time now is 11:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration