Home » Questions » Computers [ Ask a new question ]

To compare the content of two folders by some app in OS X

To compare the content of two folders by some app in OS X

I am improving my friend's LaTeX document at folder 1/2, while he is editing the folder 1/1.

Asked by: Guest | Views: 351
Total answers/comments: 3
Guest [Entry]

"You're wanting to find the differences in files in two folders and merge the changes?

If you're looking for a GUI utility you can use FileMerge which can be found at /Developer/Applications/Utilities/ if you have Apple's Developer Tools installed. It has some odd bugs - mostly to deal with handling file encoding.

If you're looking for something faster and nicer check out Changes.app - it's not cheap but has been worth the price of admission several times over for me.

If you want to do it via the command line you can use diff to find the differences and then manually merge the files together as it will list all the differences. (eg. diff ~/Desktop/a ~/Desktop/b)"
Guest [Entry]

"The following code is made by Git-community

#!/bin/sh
#
# Filemerge.app must not already be open before running
# this script, or opendiff below will return immediately,
# and the TMPDIRs deleted before it gets the chance to read
# them.

[ \$# -eq 7 ] && opendiff ""\$2"" ""\$5""
EOF
chmod +x merge.sh
GIT_EXTERNAL_DIFF=./merge.sh git-diff

if test $# = 0; then
OLD=`git-write-tree`
elif test ""$1"" = --cached; then
OLD=HEAD
NEW=`git-write-tree`
shift
fi
if test $# -gt 0; then
OLD=""$1""; shift
fi
test $# -gt 0 && test -z ""$CACHED"" && NEW=""$1""

TMPDIR1=`mktemp -d`
git-archive --format=tar $OLD | (cd $TMPDIR1; tar xf -)
if test -z ""$NEW""; then
TMPDIR2=$(git rev-parse --show-cdup)
test -z ""$cdup"" && TMPDIR2=.
else
TMPDIR2=`mktemp -d`
git-archive --format=tar $NEW | (cd $TMPDIR2; tar xf -)
fi

opendiff $TMPDIR1 $TMPDIR2 | cat
rm -rf $TMPDIR1
test ! -z ""$NEW"" && rm -rf $TMPDIR2

You can then run

opendiff folder1 folder2

to achieve what I want."
Qhvdfw [Entry]

lipitor 10mg tablet <a href="https://lipiws.top/">cost lipitor 10mg</a> order atorvastatin pills