Skip to content

Filemerge and opendiff

dickgroenenberg edited this page Nov 19, 2020 · 1 revision

Comparing two files with FileMerge

Either files can be drag'n'dropped or filepaths can be used.
Remote servers (such as Galaxy) need to be mounted in the Finder
(mount_Produktie if that alias has been set).
The usage of filepaths is generally more convenient, especially
when files are burried deep in the system. With a ssh connection
(Produktie if that alias has been set) file paths can be obtained using:
readlink -f filename
In Galaxy this will result in: /home/galaxy/path/to/file
Be aware that the mountpoint in the Finder will be different;
For the Production-server the path will be:
/Users/dickgroenenberg/Documents/Mountpoints/Produktie/galaxy/path/to/file

To start Filemerge and compare files on Galaxy from the terminal:
opendiff /Users/dickgroenenberg/Documents/Mountpoints/Produktie/galaxy/path/to/file_1 /Users/dickgroenenberg/Documents/Mountpoints/Produktie/galaxy/path/to/file_2

Edit a remote file with Textmate

Remote files can be edited by either opening the files on the remote volume
via a mounted path:
mate /Users/dickgroenenberg/Documents/Mountpoints/Produktie/galaxy/path/to/file
(this assumes the mate shell commmand is installed).

Alternatively, a better option might be to use rmate
directly in the ssh session.
Rmate method makes use of Reverse SSH Tunneling.

Clone this wiki locally