File compare on ftp-server and in a folder in Linux?

5

1

How to compare files on ftp-server and in a folder in Linux?

Vytas

Posted 2010-04-12T09:12:51.937

Reputation: 429

@quackquixote, What do you mean? Most file comparators do roughly about the same thing. He just need it to work with FTP. – Pacerier – 2015-07-06T16:32:45.517

3how detailed a comparison do you need? – quack quixote – 2010-04-12T10:52:39.807

i need to compare directory structure (n-level) with <10k files (name,extension,size) so, simple comparison – Vytas – 2010-04-12T19:01:03.223

Answers

2

You can use the jdiff and ftp plugins in jEdit to do this (presuming the target files are text).

warren

Posted 2010-04-12T09:12:51.937

Reputation: 8 599

3

For folders i used Krusader and, with some success, WinSCP over WINE (and, with much more success, with WinSCP in Windows, in another machine, either real or virtual).

Small problems are, Krusader is going to have problems if files are 0 sized. Despite that, everything else work perfect.

In older distros or krusader versions, some dates are going to be shown incorrectly, making it believe local or remote copies are older than their cunterparts, due to time differences between time zones and local and server.

WinSCP is much more robust to deal with differences in time and other things, but it is slower and if path exceds the 256 characters lenght (a windows cronic issue) it is going to crash.

In another machine, you need to mount the Linux folder (via Samba or the VM folder share method) as a disk. That could also helps with the 256 characters path cronic illness on Windows apps.

I know the question is pretty old, but, it is one of the first results on google, so this is my 2 cents of contribution.

cablop

Posted 2010-04-12T09:12:51.937

Reputation: 179

2

Try with

$ vimdiff local_file ftp://[user@]machine[:port]/remote_file

For example

$ vimdiff todo.txt ftp://mrucci@192.168.1.68/todo.txt

The password, if needed, can be entered later.

mrucci

Posted 2010-04-12T09:12:51.937

Reputation: 8 398

1

You will need to use a bash script and compare file listings in the two places. You will need to make sure that the file listings are consistent so you can compare them.

matpol

Posted 2010-04-12T09:12:51.937

Reputation: 387

1

Not the ideal solution, but Total Commander @ wine will do the task.

Other tools: http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools

dvska

Posted 2010-04-12T09:12:51.937

Reputation: 111

How well is Wine performance? – Pacerier – 2015-07-06T16:33:07.180

0

Could not get meld or kompare to use ftp://...

However if the ftp server is not to big you could use wget --mirror and then do the diff locally, I know it's not the best solution... but it may work.


I have not tried this but there seem to be a possibility to mount the ftp server, using ftpfs or fuse or something like that (see Mounting ftp host to local directory on top of FUSE or HOWTO: mount ftpfs under Linux).

Then you could use the normal diff tools since now the ftp server behaves like a local dir.

Johan

Posted 2010-04-12T09:12:51.937

Reputation: 4 827

1meld or kompare (or vim with netrw) will have to fetch the file, too, so everything you propose would be local anyway. – Benjamin Bannier – 2010-04-12T12:48:40.003