Sponsored Content
Top Forums UNIX for Dummies Questions & Answers comparing the content of two directories Post 302190335 by cbkihong on Tuesday 29th of April 2008 10:36:35 AM
Old 04-29-2008
If you are not trying to put it into a program, and that using some sort of GUI is acceptable, I found diff frontends such as kdiff3, kompare and meld helpful because they will highlight what the differences are using a lot of visual aids such as colours to make diffs a lot more pleasurable to read.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing file content differences

I need to write a script to find out if there are any .c files created/removed from the last time i monitored the files available. i first created a file to contain all the .c files available on the system. (ls *.c > file1) I created another file using the same command. I used the comm file1... (4 Replies)
Discussion started by: RianTan
4 Replies

2. UNIX for Dummies Questions & Answers

Comparing directories via ftp

Hello! I am trying to compare a list of files in 2 directories - one on our unix server (I'll call it 'ours') and one on a site we ftp to (I'll call it 'ftp'). I need to make sure that after we ftp, the names that we put out there match the names we have on our side. I was thinking to create a... (1 Reply)
Discussion started by: tekster757
1 Replies

3. Shell Programming and Scripting

comparing content of 2 variables in script

hello how can i compare the content of two variables using the if or for loops. I have 2 variables which was formed as result of commands pass into them but i want to now compare the 2 contents and echo where their is a match for examples variable1=`cat file2` variable2=`cat file3` if #... (5 Replies)
Discussion started by: sam4now
5 Replies

4. Shell Programming and Scripting

comparing files content

hi i have a set of files , i need to compare one file content with other file content, i am using cmp -s abc.1 def.2 , but it is not giving theproper o/p even if the content is different.Please help thanks Satya (1 Reply)
Discussion started by: Satyak
1 Replies

5. Shell Programming and Scripting

Comparing 2 csv files and matching content

Hello, I have the following problem: There are two csv files csv-file #1: aaa1, aaa2, ... aaan aaa1, bbb2, ... bbbn aaa1, ccc2, ... cccn bbb1, bbb2, ... bbbn ... zzz1, zzz2, ... zzzn csv-file #2: aaa1, matchvalue1 ccc1, matchvalue2 (7 Replies)
Discussion started by: ghl10000
7 Replies

6. Shell Programming and Scripting

Comparing directories on different unix servers

Is it possible to use the diff command to compare two directories on different Unix (AIX) servers? We have two regions set up and we want to be able to compare if the scripts directory in both regions contain the same files? I want to figure out if its possible.. Have been messing around by... (10 Replies)
Discussion started by: Jazmania
10 Replies

7. Homework & Coursework Questions

comparing 2 directories

i have been asked to write a bash shell script comparing two directories and sed or awk should not be used in this assignment. compdir will compare filenames in two directories, and list information about filenames that are in one directory but not the other. The information listed will be a long... (1 Reply)
Discussion started by: soccerball
1 Replies

8. Shell Programming and Scripting

Comparing content of two variables

I have very abstract need of "comparing two variables" and take subsequent actions. please refer to image below https://lh3.googleusercontent.com/-frNk5iA3q1c/TjI3lE0sWOI/AAAAAAAAAIE/fxzB1w07gas/script_block.JPG I have a part of script which reads a file and generates variables based on... (4 Replies)
Discussion started by: animesharma
4 Replies

9. Shell Programming and Scripting

Comparing 2 UNIX directories

Hello, I'd want to compare the content of 2 directories in unix. I use the diff command like this: diff /home/user/AAAAA /home/user/BBBBB It works fine, but when a same file is in both directories and they are diferents, I'd want to see only that it is diferent and not all... (4 Replies)
Discussion started by: nolo41
4 Replies

10. Shell Programming and Scripting

Comparing two directories with diff

Hi all, I have 2 directories on two different servers. I am trying to find out what is missing from directory X and what is missing from directory Y. they should both have the same exact files in them. I understand some files may be missing from both directories on each server. I am not sure... (8 Replies)
Discussion started by: jeffs42885
8 Replies
GIT-DIFFTOOL(1) 						    Git Manual							   GIT-DIFFTOOL(1)

NAME
git-difftool - Show changes using common diff tools SYNOPSIS
git difftool [<options>] [<commit> [<commit>]] [--] [<path>...] DESCRIPTION
git difftool is a Git command that allows you to compare and edit files between revisions using common diff tools. git difftool is a frontend to git diff and accepts the same options and arguments. See git-diff(1). OPTIONS
-d, --dir-diff Copy the modified files to a temporary location and perform a directory diff on them. This mode never prompts before launching the diff tool. -y, --no-prompt Do not prompt before launching a diff tool. --prompt Prompt before each invocation of the diff tool. This is the default behaviour; the option is provided to override any configuration settings. -t <tool>, --tool=<tool> Use the diff tool specified by <tool>. Valid values include emerge, kompare, meld, and vimdiff. Run git difftool --tool-help for the list of valid <tool> settings. If a diff tool is not specified, git difftool will use the configuration variable diff.tool. If the configuration variable diff.tool is not set, git difftool will pick a suitable default. You can explicitly provide a full path to the tool by setting the configuration variable difftool.<tool>.path. For example, you can configure the absolute path to kdiff3 by setting difftool.kdiff3.path. Otherwise, git difftool assumes the tool is available in PATH. Instead of running one of the known diff tools, git difftool can be customized to run an alternative program by specifying the command line to invoke in a configuration variable difftool.<tool>.cmd. When git difftool is invoked with this tool (either through the -t or --tool option or the diff.tool configuration variable) the configured command line will be invoked with the following variables available: $LOCAL is set to the name of the temporary file containing the contents of the diff pre-image and $REMOTE is set to the name of the temporary file containing the contents of the diff post-image. $MERGED is the name of the file which is being compared. $BASE is provided for compatibility with custom merge tool commands and has the same value as $MERGED. --tool-help Print a list of diff tools that may be used with --tool. --[no-]symlinks git difftool's default behavior is create symlinks to the working tree when run in --dir-diff mode and the right-hand side of the comparison yields the same content as the file in the working tree. Specifying --no-symlinks instructs git difftool to create copies instead. --no-symlinks is the default on Windows. -x <command>, --extcmd=<command> Specify a custom command for viewing diffs. git-difftool ignores the configured defaults and runs $command $LOCAL $REMOTE when this option is specified. Additionally, $BASE is set in the environment. -g, --[no-]gui When git-difftool is invoked with the -g or --gui option the default diff tool will be read from the configured diff.guitool variable instead of diff.tool. The --no-gui option can be used to override this setting. --[no-]trust-exit-code git-difftool invokes a diff tool individually on each file. Errors reported by the diff tool are ignored by default. Use --trust-exit-code to make git-difftool exit when an invoked diff tool returns a non-zero exit code. git-difftool will forward the exit code of the invoked tool when --trust-exit-code is used. See git-diff(1) for the full list of supported options. CONFIG VARIABLES
git difftool falls back to git mergetool config variables when the difftool equivalents have not been defined. diff.tool The default diff tool to use. diff.guitool The default diff tool to use when --gui is specified. difftool.<tool>.path Override the path for the given tool. This is useful in case your tool is not in the PATH. difftool.<tool>.cmd Specify the command to invoke the specified diff tool. See the --tool=<tool> option above for more details. difftool.prompt Prompt before each invocation of the diff tool. difftool.trustExitCode Exit difftool if the invoked diff tool returns a non-zero exit status. See the --trust-exit-code option above for more details. SEE ALSO
git-diff(1) Show changes between commits, commit and working tree, etc git-mergetool(1) Run merge conflict resolution tools to resolve merge conflicts git-config(1) Get and set repository or global options GIT
Part of the git(1) suite Git 2.17.1 10/05/2018 GIT-DIFFTOOL(1)
All times are GMT -4. The time now is 05:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy